diff options
Diffstat (limited to 'tests/stdlib/tunittest.nim')
-rw-r--r-- | tests/stdlib/tunittest.nim | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim index 505fb41a3..0442c7863 100644 --- a/tests/stdlib/tunittest.nim +++ b/tests/stdlib/tunittest.nim @@ -19,10 +19,12 @@ discard """ [Suite] test name filtering ''' +matrix: "--mm:refc; --mm:orc" targets: "c js" """ -import unittest, sequtils +import std/[unittest, sequtils, assertions] +from std/unittest {.all.} import matchFilter proc doThings(spuds: var int): int = spuds = 24 @@ -33,12 +35,12 @@ test "#964": check spuds == 24 -from strutils import toUpperAscii +from std/strutils import toUpperAscii test "#1384": check(@["hello", "world"].map(toUpperAscii) == @["HELLO", "WORLD"]) -import options +import std/options test "unittest typedescs": check(none(int) == none(int)) check(none(int) != some(1)) @@ -49,8 +51,8 @@ test "unittest multiple requires": require(true) -import random -from strutils import parseInt +import std/random +from std/strutils import parseInt proc defectiveRobot() = case rand(1..4) of 1: raise newException(OSError, "CANNOT COMPUTE!") @@ -177,3 +179,16 @@ suite "test name filtering": check false == matchFilter("suite1", "foo", "*ite2::") check matchFilter("suite1", "q**we::foo", "q**we::foo") check matchFilter("suite1", "a::b*c::d*e", "a::b*c::d*e") + + +block: + type MyFoo = object + var obj = MyFoo() + let check = 1 + check(obj == obj) + +block: + let check = 123 + var a = 1 + var b = 1 + check(a == b) |