summary refs log tree commit diff stats
path: root/tests/stdlib/tunittest.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-02 08:31:38 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-02 08:31:38 +0200
commite9243a16167b24899d4fcf051f3252b3a5804811 (patch)
treedc4733a6f178d4f04ee4da33c50ca807eb7e9dd0 /tests/stdlib/tunittest.nim
parentfc7961d4ccd31ab6e7eabbeb7aa22b5488924b4f (diff)
parent02ff5f596c330b68927f843814ecb9b86c2eee67 (diff)
downloadNim-e9243a16167b24899d4fcf051f3252b3a5804811.tar.gz
Merge branch 'devel' into araq
Diffstat (limited to 'tests/stdlib/tunittest.nim')
-rw-r--r--tests/stdlib/tunittest.nim27
1 files changed, 21 insertions, 6 deletions
diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim
index 674ce50dd..e4a801871 100644
--- a/tests/stdlib/tunittest.nim
+++ b/tests/stdlib/tunittest.nim
@@ -1,12 +1,23 @@
 discard """
-  nimout: "compile start\ncompile end"
+  output: '''[Suite] suite with only teardown
+
+[Suite] suite with only setup
+
+[Suite] suite with none
+
+[Suite] suite with both
+
+[Suite] bug #4494
+
+[Suite] bug #5571
+
+[Suite] bug #5784
+
+'''
 """
 
 import unittest, sequtils
 
-static:
-  echo "compile start"
-
 proc doThings(spuds: var int): int =
   spuds = 24
   return 99
@@ -103,5 +114,9 @@ suite "bug #5571":
       check: line == "a"
     doTest()
 
-static:
-  echo "compile end"
+suite "bug #5784":
+  test "`or` should short circuit":
+    type Obj = ref object
+      field: int
+    var obj: Obj
+    check obj.isNil or obj.field == 0