diff options
Diffstat (limited to 'tests/collections/tcollections_to_string.nim')
-rw-r--r-- | tests/collections/tcollections_to_string.nim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/collections/tcollections_to_string.nim b/tests/collections/tcollections_to_string.nim index 686b9916b..62ba87334 100644 --- a/tests/collections/tcollections_to_string.nim +++ b/tests/collections/tcollections_to_string.nim @@ -19,15 +19,18 @@ doAssert $(@["1", "2", "3"]) == """@["1", "2", "3"]""" doAssert $(@['1', '2', '3']) == """@['1', '2', '3']""" # Tests for sets -doAssert $(toSet([1])) == "{1}" -doAssert $(toSet(["1"])) == """{"1"}""" -doAssert $(toSet(['1'])) == """{'1'}""" +doAssert $(toHashSet([1])) == "{1}" +doAssert $(toHashSet(["1"])) == """{"1"}""" +doAssert $(toHashSet(['1'])) == """{'1'}""" doAssert $(toOrderedSet([1, 2, 3])) == "{1, 2, 3}" doAssert $(toOrderedSet(["1", "2", "3"])) == """{"1", "2", "3"}""" doAssert $(toOrderedSet(['1', '2', '3'])) == """{'1', '2', '3'}""" # Tests for tables -doAssert $({1: "1", 2: "2"}.toTable) == """{1: "1", 2: "2"}""" +when defined(nimIntHash1): + doAssert $({1: "1", 2: "2"}.toTable) == """{1: "1", 2: "2"}""" +else: + doAssert $({1: "1", 2: "2"}.toTable) == """{2: "2", 1: "1"}""" doAssert $({"1": 1, "2": 2}.toTable) == """{"1": 1, "2": 2}""" # Tests for deques |