diff options
Diffstat (limited to 'tests/stdlib/tunittest.nim')
-rw-r--r-- | tests/stdlib/tunittest.nim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim new file mode 100644 index 000000000..b23b3cdab --- /dev/null +++ b/tests/stdlib/tunittest.nim @@ -0,0 +1,21 @@ +import unittest + + +proc doThings(spuds: var int): int = + spuds = 24 + return 99 +test "#964": + var spuds = 0 + check doThings(spuds) == 99 + check spuds == 24 + + +from strutils import toUpper +test "#1384": + check(@["hello", "world"].map(toUpper) == @["HELLO", "WORLD"]) + + +import options +test "unittest typedescs": + check(none(int) == none(int)) + check(none(int) != some(1)) |