mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
array: test arr << arr
This commit is contained in:
parent
0d52cc97e4
commit
ab368bdc53
@ -536,3 +536,13 @@ fn test_bools() {
|
||||
a << true
|
||||
println(a)
|
||||
}
|
||||
|
||||
fn test_push_many_self() {
|
||||
mut actual_arr := [1, 2, 3, 4]
|
||||
actual_arr << actual_arr
|
||||
expected_arr := [1, 2, 3, 4, 1, 2, 3, 4]
|
||||
assert actual_arr.len == expected_arr.len
|
||||
for i := 0; i < actual_arr.len; i++ {
|
||||
assert actual_arr[i] == expected_arr[i]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user