diff options
author | Hans Raaf <hara@oderwat.de> | 2015-03-17 00:14:40 +0100 |
---|---|---|
committer | Hans Raaf <hara@oderwat.de> | 2015-03-17 00:15:23 +0100 |
commit | a41778725ad8064f061d2efea1da442dd3bb0c26 (patch) | |
tree | 02e95e9812a90a6971edfa4326391e788e8a64d2 /tests/collections | |
parent | b42c729da482d40ce22d049768b1d2d957212ea0 (diff) | |
download | Nim-a41778725ad8064f061d2efea1da442dd3bb0c26.tar.gz |
Added Test for zip() with anonymous tuples.
Diffstat (limited to 'tests/collections')
-rw-r--r-- | tests/collections/ttablesref.nim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/collections/ttablesref.nim b/tests/collections/ttablesref.nim index b57aedf4a..16b0d831e 100644 --- a/tests/collections/ttablesref.nim +++ b/tests/collections/ttablesref.nim @@ -2,7 +2,7 @@ discard """ output: '''true''' """ -import hashes, tables +import hashes, tables, sequtils const data = { @@ -103,9 +103,10 @@ block countTableTest1: block SyntaxTest: var x = newTable[int, string]({:}) + discard x block nilTest: - var i, j: PTable[int, int] = nil + var i, j: TableRef[int, int] = nil assert i == j j = newTable[int, int]() assert i != j @@ -131,6 +132,10 @@ proc orderedTableSortTest() = # check that insert still works: t["newKeyHere"] = 80 +block anonZipTest: + let keys = @['a','b','c'] + let values = @[1, 2, 3] + doAssert "{a: 1, b: 2, c: 3}" == $ toTable zip(keys, values) orderedTableSortTest() echo "true" |