Tested _concat() with clashing dict keys

This commit is contained in:
2023-02-05 22:46:00 +00:00
parent be91de9535
commit c0ec5ef28e
2 changed files with 15 additions and 27 deletions

View File

@@ -23,6 +23,16 @@ import compound;
assert c == ["one" : 1, "two": 2, "three": 3, "four" : 4, "five": 5, "six": 6], "dictionary.concat() comparison failed";
}
//test dictionary concat with clashing keys
{
var a = ["one" : 1, "two": 2, "three": 3, "random": 1];
var b = ["four" : 4, "five": 5, "six": 6, "random": 2];
var c = a.concat(b);
assert c["random"] == 1, "dictionary.concat() clashing keys failed";
}
//test string concat
{
var a = "foo";