Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
structs
/
struct_eq_op_test.v
12
lines
·
10
sloc
·
142 bytes
·
d9158e788546e3d5dcf6895f4eb16a14e367cab5
Raw
1
struct
MyInt {
2
x int
3
}
4
5
fn
(i1 MyInt) == (i2 MyInt) bool {
6
return
i1.x == i2.x
7
}
8
9
fn
test_main() {
10
c := MyInt{30} == MyInt{2}
11
assert !c
12
}
13