mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -291,7 +291,6 @@ fn test_plus_assign_string() {
|
||||
assert m['one'] == '1'
|
||||
}
|
||||
|
||||
|
||||
fn test_map_keys_to_array() {
|
||||
m := {'a': 'b', 'c': 'd'}
|
||||
mut arr := []string{}
|
||||
@@ -302,11 +301,3 @@ fn test_map_keys_to_array() {
|
||||
println(sarr)
|
||||
assert sarr == "['a', 'c']"
|
||||
}
|
||||
|
||||
fn test_map_cross_assign() {
|
||||
mut a := {'one':1, 'two':2}
|
||||
a['one'], a['two'] = a['two'], a['one']
|
||||
println(a)
|
||||
assert a['one'] == 2
|
||||
assert a['two'] == 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user