1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/struct_equality_test.v
2020-12-28 18:22:47 +02:00

16 lines
237 B
V

struct User {
name string
age int
}
fn test_struct_equality() {
mut usr1 := User{'sanath', 28}
mut usr2 := User{'sanath', 28}
if usr1 == usr2 {
println('Same User')
} else {
println('Not same User')
}
assert usr1 == usr2
}