array_test.v: str() test

pull/2356/head
Alexander Medvednikov 2019-10-25 22:40:52 +03:00
parent 8d2111169a
commit 5510327d70
1 changed files with 8 additions and 0 deletions

View File

@ -364,3 +364,11 @@ fn test_filter() {
assert d[0] == 'is'
assert d[1] == 'awesome'
}
fn test_array_str() {
numbers := [1, 2, 3]
numbers2 := [numbers, [4, 5, 6]] // dup str() bug
assert true
assert numbers.str() == '[1, 2, 3]'
assert numbers2.str() == '[[1, 2, 3], [4, 5, 6]]'
}