mirror of
https://github.com/vlang/v.git
synced 2025-09-14 23:12:33 +03:00
cgen: fix fixed arrays literal eq (#8079)
This commit is contained in:
parent
7458b699d0
commit
ae592299dc
2 changed files with 18 additions and 0 deletions
|
@ -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]!]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue