v2 / vlib / v / tests / c_const_u8_test.v
17 lines · 12 sloc · 268 bytes · 1411c2710b03c53fa0de08d39c656d98721783f6
Raw
1import net as _
2
3const C.AF_UNIX u16
4
5fn x16(n u16) bool {
6 return true
7}
8
9fn xint(n int) bool {
10 return true
11}
12
13fn 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