summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorSimon Hafner <hafnersimon@gmail.com>2014-02-10 12:44:44 -0600
committerSimon Hafner <hafnersimon@gmail.com>2014-02-10 12:44:44 -0600
commit0b5c14962e63f3aca0c7480de2428568b4ba6650 (patch)
treebe69ed29c547005c99493cbd27e98987d96b3074 /tests/stdlib
parent5d939570488706553bdb3dc58d7902e454cd6de4 (diff)
downloadNim-0b5c14962e63f3aca0c7480de2428568b4ba6650.tar.gz
added `map` to sets
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/tsets.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/tsets.nim b/tests/stdlib/tsets.nim
new file mode 100644
index 000000000..a30373d37
--- /dev/null
+++ b/tests/stdlib/tsets.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''true'''
+"""
+
+import sets
+var
+  a = initSet[int]()
+  b = initSet[int]()
+
+for i in 0..5: a.incl(i)
+for i in 1..6: b.incl(i)
+
+echo map(a, proc(x: int): int = x + 1) == b