test: fix `test_array_init()`

pull/5395/head
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
1 changed files with 2 additions and 2 deletions

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() {