summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-11-19 23:07:51 -0800
committerGitHub <noreply@github.com>2020-11-20 08:07:51 +0100
commit109cc45398bcdafc22f0a5e49cdfda8234bc46de (patch)
tree5e1573dbb2b2946cd67b8e47def266ddae59796c /tests/stdlib
parent59332ec2352aa1d1c0fa4401eff7fefe8f4187da (diff)
downloadNim-109cc45398bcdafc22f0a5e49cdfda8234bc46de.tar.gz
packedsets fix regression introduced in #15564 (#16060)
* packedsets fix regression introduced in #15564

* add tests
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/mintsets.nim10
-rw-r--r--tests/stdlib/tintsets.nim6
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib/mintsets.nim b/tests/stdlib/mintsets.nim
new file mode 100644
index 000000000..b4d9ed516
--- /dev/null
+++ b/tests/stdlib/mintsets.nim
@@ -0,0 +1,10 @@
+import std/intsets
+
+proc test1*[]() =
+  let a = initIntSet()
+  doAssert len(a) == 0
+
+proc test2*[]() =
+  var a = initIntSet()
+  var b = initIntSet()
+  a.incl b
diff --git a/tests/stdlib/tintsets.nim b/tests/stdlib/tintsets.nim
new file mode 100644
index 000000000..191ef117e
--- /dev/null
+++ b/tests/stdlib/tintsets.nim
@@ -0,0 +1,6 @@
+import ./mintsets
+
+block: # bug https://github.com/nim-lang/Nim/pull/15564#issuecomment-729878104
+  # related to bug #11167
+  test1()
+  test2()