diff options
author | Araq <rumpf_a@web.de> | 2015-10-13 00:22:27 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-10-13 00:22:27 +0200 |
commit | d8b0edc3230b6bc1902522b40c12862487fafc82 (patch) | |
tree | d7e34249abdfc7a33ae2ae20b6e71081fbf1c77e /tests/collections | |
parent | 2c33ebed7be1313fc66a80437a66e9d4155308a9 (diff) | |
parent | 4a471d82310659bcb9683b9e81ba9e4af5e23062 (diff) | |
download | Nim-d8b0edc3230b6bc1902522b40c12862487fafc82.tar.gz |
Merge branch 'mget' of https://github.com/def-/Nim into def--mget
Conflicts: lib/pure/collections/critbits.nim lib/pure/collections/tables.nim lib/pure/xmltree.nim lib/system/sets.nim tests/collections/ttables.nim tests/collections/ttablesref.nim
Diffstat (limited to 'tests/collections')
-rw-r--r-- | tests/collections/ttables.nim | 6 | ||||
-rw-r--r-- | tests/collections/ttablesref.nim | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/collections/ttables.nim b/tests/collections/ttables.nim index a10606843..a8a182a78 100644 --- a/tests/collections/ttables.nim +++ b/tests/collections/ttables.nim @@ -60,8 +60,12 @@ block tableTest2: t["123"] = 1.5 # test overwriting assert t["123"] == 1.5 - assert t["111"] == 0.0 # deleted + try: + echo t["111"] # deleted + except KeyError: + discard assert(not hasKey(t, "111")) + assert "123" in t assert("111" notin t) diff --git a/tests/collections/ttablesref.nim b/tests/collections/ttablesref.nim index 0b641ebc7..32494f1f2 100644 --- a/tests/collections/ttablesref.nim +++ b/tests/collections/ttablesref.nim @@ -60,8 +60,10 @@ block tableTest2: t["123"] = 1.5 # test overwriting assert t["123"] == 1.5 - assert t["111"] == 0.0 # deleted - assert "123" in t + try: + echo t["111"] # deleted + except KeyError: + discard assert(not hasKey(t, "111")) assert "111" notin t |