mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
This commit is contained in:
parent
c21527d3c6
commit
6cbc0e84f0
5 changed files with 91 additions and 37 deletions
|
@ -877,16 +877,3 @@ fn test_plus_assign_string() {
|
|||
a[0] += 'abc'
|
||||
assert a == ['abc']
|
||||
}
|
||||
|
||||
fn test_cross_assign() {
|
||||
mut a := [0, 1]
|
||||
a[0], a[1] = a[1], a[0]
|
||||
assert a[0] == 1
|
||||
assert a[1] == 0
|
||||
|
||||
mut b1 := [1, 2, 3]
|
||||
mut b2 := 4
|
||||
b1[2], b2, b1[0] = b1[0], b1[2], 5
|
||||
assert b1 == [5, 2, 1]
|
||||
assert b2 == 3
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue