summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-05-26 18:32:10 -0400
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-05-26 18:41:28 -0400
commit3daef85d6ee73c7ef3c89c5ca0738698bcdbfbfa (patch)
tree139e376762cc0b792f2e41d609483f14a0f5e7cc
parentc9616897f0e0d932c75b61ed96124d8cbac35076 (diff)
downloadNim-3daef85d6ee73c7ef3c89c5ca0738698bcdbfbfa.tar.gz
Fix #964, fix #1384
Doesn't actually fix those bugs, but they can no longer be reproduced. Test
cases have been added.
-rw-r--r--tests/stdlib/tunittest.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim
index 3726eaa9e..b23b3cdab 100644
--- a/tests/stdlib/tunittest.nim
+++ b/tests/stdlib/tunittest.nim
@@ -1,4 +1,20 @@
 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))