mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix fixed arrays literal eq (#8079)
This commit is contained in:
@ -44,3 +44,17 @@ fn test_fixed_array_eq() {
|
||||
assert a8 == [['aaa', 'bbb']!!, ['ccc', 'ddd']!!]
|
||||
assert a8 != [['bbb', 'aaa']!!, ['cccc', 'dddd']!!]
|
||||
}
|
||||
|
||||
fn test_fixed_array_literal_eq() {
|
||||
assert [1, 2, 3]! == [1, 2, 3]!
|
||||
assert [1, 1, 1]! != [1, 2, 3]!
|
||||
|
||||
assert [[1, 2], [3, 4]]! == [[1, 2], [3, 4]]!
|
||||
assert [[1, 1], [2, 2]]! != [[1, 2], [3, 4]]!
|
||||
|
||||
assert [[1, 1]!, [2, 2]!]! == [[1, 1]!, [2, 2]!]!
|
||||
assert [[1, 1]!, [2, 2]!]! != [[1, 2]!, [2, 3]!]!
|
||||
|
||||
assert [[1, 1]!, [2, 2]!] == [[1, 1]!, [2, 2]!]
|
||||
assert [[1, 1]!, [2, 2]!] != [[1, 2]!, [2, 3]!]
|
||||
}
|
||||
|
Reference in New Issue
Block a user