1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

test: fix test_array_init()

This commit is contained in:
yuyi 2020-06-16 04:31:11 +08:00 committed by GitHub
parent 49d7a151b7
commit 730f485591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,13 +6,13 @@ fn test_array_init() {
b := [1, 2, 3]
mut a := []int{cap: b.len}
a << 1
'$a, $a.len, $a.cap' == '[1], 1, 3'
assert '$a, $a.len, $a.cap' == '[1], 1, 3'
c := Init{len: 3}
mut d := []string{cap: c.len}
d << 'aaa'
d << 'bbb'
'$d, $d.len, $d.cap' == "['aaa', 'bbb'], 2, 3"
assert '$d, $d.len, $d.cap' == "['aaa', 'bbb'], 2, 3"
}
fn test_nested_array_init() {