v/vlib/compiler/tests/cstrings_test.v

9 lines
129 B
V
Raw Normal View History

2019-12-04 11:34:06 +01:00
fn test_cstring(){
w := c'world'
hlen := C.strlen(c'hello')
wlen := C.strlen(w)
assert hlen == 5
assert wlen == 5
2019-12-04 11:34:06 +01:00
}