summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2014-02-10 13:02:47 -0600
committerSimon Hafner <hafnersimon@gmail.com>2014-02-10 13:02:47 -0600
commite8c87d070a4fa507208a042e9f02b356eaa567ad (patch)
treecfe9dbc0694a582cd857728d3506fe014f50aa3e /tests
parent56c41ae1401a90188c4238269b9f43abc466aafa (diff)
downloadNim-e8c87d070a4fa507208a042e9f02b356eaa567ad.tar.gz
fixed a bug in `map` for sets
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tsets.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/stdlib/tsets.nim b/tests/stdlib/tsets.nim
index a30373d37..656c5b3f2 100644
--- a/tests/stdlib/tsets.nim
+++ b/tests/stdlib/tsets.nim
@@ -1,13 +1,17 @@
 discard """
-  output: '''true'''
+  output: '''true
+true'''
 """
 
 import sets
 var
   a = initSet[int]()
   b = initSet[int]()
+  c = initSet[string]()
 
 for i in 0..5: a.incl(i)
 for i in 1..6: b.incl(i)
+for i in 0..5: c.incl($i)
 
 echo map(a, proc(x: int): int = x + 1) == b
+echo map(a, proc(x: int): string = $x) == c