Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
builtin_arrays
/
unsafe_fixed_array_test.v
11
lines
·
10
sloc
·
214 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_fixed_array_on_unsafe_int() {
2
x := [3]int{}
3
y := unsafe { x }
4
assert x == [0, 0, 0]!
5
}
6
7
fn
test_fixed_array_on_unsafe_string() {
8
x := [3]string{init:
''
}
9
y := unsafe { x }
10
assert x == [
''
,
''
,
''
]!
11
}
12