v2 / vlib / v / tests / reserved_keywords_array_test.v
9 lines · 9 sloc · 220 bytes · 3fd2dd45a4e247ee3f2f336fabcefb716e3c3e72
Raw
1fn test_reserved_keywords_array_and_string() {
2 array := [1, 2, 3, 4]
3 mut res1 := array.map(it * 3)
4 mut res2 := array.filter(it > 2)
5 println(res1)
6 assert res1 == [3, 6, 9, 12]
7 println(res2)
8 assert res2 == [3, 4]
9}
10