array: 2d and 3d test

pull/2238/head
Alexander Medvednikov 2019-10-05 16:03:13 +03:00
parent 136ede989f
commit 735336e569
1 changed files with 12 additions and 0 deletions

View File

@ -275,3 +275,15 @@ fn test_find_index() {
assert d.index(`c`) == 2
assert d.index(`u`) == -1
}
fn test_multi() {
a := [[1,2,3],[4,5,6]]
assert a.len == 2
assert a[0].len == 3
assert a[0][0] == 1
assert a[0][2] == 3
assert a[1][2] == 6
// TODO
//b := [ [[1,2,3],[4,5,6]], [[1,2]] ]
//assert b[0][0][0] == 1
}