v2 / vlib / v / tests / complex_dim_fixed_array_test.v
10 lines · 8 sloc · 230 bytes · 8e9f412f747556faa26a46afb5542a8f31c5262f
Raw
1const k = 2
2
3fn test_complex_dim_fixed_array() {
4 result := [[0, 0]!, [0, 0]!]!
5
6 assert result == [2][k]int{}
7 assert result == [2][k + 1 - 1]int{}
8 assert result == [k][(k + 1) * 2 - 4]int{}
9 assert result == [k][int(k)]int{}
10}
11