diff options
Diffstat (limited to 'tests/js')
-rw-r--r-- | tests/js/readme.md | 5 | ||||
-rw-r--r-- | tests/js/t16822.nim | 29 |
2 files changed, 5 insertions, 29 deletions
diff --git a/tests/js/readme.md b/tests/js/readme.md new file mode 100644 index 000000000..7fcc722fa --- /dev/null +++ b/tests/js/readme.md @@ -0,0 +1,5 @@ +## notes +Prefer moving tests to a non-js directory so that they get tested across all backends automatically. +Ideally, tests/js should be reserved to code that only makes sense in js. + +Note also that tests for a js specific module (e.g.: `std/jsbigints`) belong to `tests/stdlib`, (e.g.: `tests/stdlib/tjsbigints.nim`) diff --git a/tests/js/t16822.nim b/tests/js/t16822.nim deleted file mode 100644 index 687d60be9..000000000 --- a/tests/js/t16822.nim +++ /dev/null @@ -1,29 +0,0 @@ -block: # bug #16822 - var scores: seq[(set[char], int)] = @{{'/'} : 10} - - var x1: set[char] - for item in items(scores): - x1 = item[0] - - doAssert x1 == {'/'} - - var x2: set[char] - for (chars, value) in items(scores): - x2 = chars - - doAssert x2 == {'/'} - -block: # bug #14574 - proc fn(): auto = - let a = @[("foo", (12, 13))] - for (k,v) in a: - return (k,v) - doAssert fn() == ("foo", (12, 13)) - -block: # bug #14574 - iterator fn[T](a:T): lent T = yield a - let a = (10, (11,)) - proc bar(): auto = - for (x,y) in fn(a): - return (x,y) - doAssert bar() == (10, (11,)) \ No newline at end of file |