test: fix `test_array_init()`
parent
49d7a151b7
commit
730f485591
|
@ -6,13 +6,13 @@ fn test_array_init() {
|
||||||
b := [1, 2, 3]
|
b := [1, 2, 3]
|
||||||
mut a := []int{cap: b.len}
|
mut a := []int{cap: b.len}
|
||||||
a << 1
|
a << 1
|
||||||
'$a, $a.len, $a.cap' == '[1], 1, 3'
|
assert '$a, $a.len, $a.cap' == '[1], 1, 3'
|
||||||
|
|
||||||
c := Init{len: 3}
|
c := Init{len: 3}
|
||||||
mut d := []string{cap: c.len}
|
mut d := []string{cap: c.len}
|
||||||
d << 'aaa'
|
d << 'aaa'
|
||||||
d << 'bbb'
|
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() {
|
fn test_nested_array_init() {
|
||||||
|
|
Loading…
Reference in New Issue