v2 / vlib / v / tests / aliases / alias_fixed_array_test.v
12 lines · 10 sloc · 210 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1type Block = [8]u8
2
3fn test_alias_fixed_array() {
4 a := [8]u8{init: 22}
5 ret := get(Block(a))
6 println(ret)
7 assert ret == 'Block([22, 22, 22, 22, 22, 22, 22, 22])'
8}
9
10fn get(b Block) string {
11 return '${b}'
12}
13