Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
aliases
/
alias_fixed_arr_test.v
19
lines
·
15
sloc
·
233 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
type
MyArray = [10]int
2
type
MyArray2 = []int
3
4
fn
test_main() {
5
a := MyArray{}
6
7
assert dump(a.len) == 10
8
9
mut
count := 0
10
for
w
in
a {
11
dump(w)
12
count++
13
}
14
assert count == 10
15
16
b := MyArray2{}
17
z := dump(b)
18
assert z.len == 0
19
}
20