1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/pointer_arithmetic_test.v
2021-07-21 23:39:49 +03:00

7 lines
123 B
V

fn test_strings() {
s := 'hi'
mut p := unsafe { s.str + 1 }
n := unsafe { p - s.str }
assert typeof(n).name == 'int'
}