Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
c_const_u8_test.v
17
lines
·
12
sloc
·
268 bytes
·
1411c2710b03c53fa0de08d39c656d98721783f6
Raw
1
import
net as _
2
3
const
C.AF_UNIX u16
4
5
fn
x16(n u16) bool {
6
return
true
7
}
8
9
fn
xint(n int) bool {
10
return
true
11
}
12
13
fn
test_const() {
14
assert xint(C.EOF) ==
true
// a random libc const is int by default
15
16
assert x16(u16(C.AF_INET)) ==
true
// defined in V's net module
17
}
18