summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-12-28 07:13:21 -0600
committerGitHub <noreply@github.com>2020-12-28 14:13:21 +0100
commit6d442a40a6f89572052d61aeb73ec26d1f3451ce (patch)
tree6867049dcd37c9610f91e93058580d87b5ca8bb2 /tests/ccgbugs
parentf9a15dbae909f4521cd506bedf7ec500c4f4d9f8 (diff)
downloadNim-6d442a40a6f89572052d61aeb73ec26d1f3451ce.tar.gz
use doAssert in tests (#16486)
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/t9286.nim4
-rw-r--r--tests/ccgbugs/twrong_tupleconv.nim2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ccgbugs/t9286.nim b/tests/ccgbugs/t9286.nim
index 8a45a7bf6..2fec23307 100644
--- a/tests/ccgbugs/t9286.nim
+++ b/tests/ccgbugs/t9286.nim
@@ -7,7 +7,7 @@ type Foo  = ref object
   i:      int
 
 proc next(foo: Foo): Option[Foo] =
-  try:    assert(foo.i == 0)
+  try:    doAssert(foo.i == 0)
   except: return      # 2º: none
   return some(foo)    # 1º: some
 
@@ -17,6 +17,6 @@ proc test =
   while isSome(opt) and foo.i < 10:
     inc(foo.i)
     opt = next(foo)   # 2º None
-  assert foo.i == 1, $foo.i
+  doAssert foo.i == 1, $foo.i
 
 test()
diff --git a/tests/ccgbugs/twrong_tupleconv.nim b/tests/ccgbugs/twrong_tupleconv.nim
index 7b1e58083..7a887d183 100644
--- a/tests/ccgbugs/twrong_tupleconv.nim
+++ b/tests/ccgbugs/twrong_tupleconv.nim
@@ -6,7 +6,7 @@ iterator myitems*[T](a: var seq[T]): var T {.inline.} =
   while i < L:
     yield a[i]
     inc(i)
-    assert(len(a) == L, "the length of the seq changed while iterating over it")
+    doAssert(len(a) == L, "the length of the seq changed while iterating over it")
 
 # Works fine
 var xs = @[1,2,3]