From 735336e569a97a7231a692fd8bbf61de6c57631a Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 5 Oct 2019 16:03:13 +0300 Subject: [PATCH] array: 2d and 3d test --- vlib/builtin/array_test.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vlib/builtin/array_test.v b/vlib/builtin/array_test.v index 2719d1391f..df8b2588e4 100644 --- a/vlib/builtin/array_test.v +++ b/vlib/builtin/array_test.v @@ -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 +}