diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/async/tasyncall.nim | 9 | ||||
-rw-r--r-- | tests/generics/toverloading_typedesc.nim | 1 | ||||
-rw-r--r-- | tests/rational/trat_init.nim | 10 |
3 files changed, 12 insertions, 8 deletions
diff --git a/tests/async/tasyncall.nim b/tests/async/tasyncall.nim index 7daecd9ef..a3926eabd 100644 --- a/tests/async/tasyncall.nim +++ b/tests/async/tasyncall.nim @@ -40,8 +40,7 @@ proc testVarargs(x, y, z: int): seq[int] = result = waitFor all(a, b, c) -suite "tasyncall": - test "testFuturesWithValue": +block: let startTime = cpuTime() results = testFuturesWithValue(42) @@ -51,14 +50,14 @@ suite "tasyncall": doAssert execTime * 1000 < taskCount * sleepDuration doAssert results == expected - test "testFuturesWithoutValues": +block: let startTime = cpuTime() testFuturesWithoutValues() let execTime = cpuTime() - startTime doAssert execTime * 1000 < taskCount * sleepDuration - test "testVarargs": +block: let startTime = cpuTime() results = testVarargs(1, 2, 3) @@ -68,7 +67,7 @@ suite "tasyncall": doAssert execTime * 100 < taskCount * sleepDuration doAssert results == expected - test "all on seq[Future]": +block: let noIntFuturesFut = all(newSeq[Future[int]]()) noVoidFuturesFut = all(newSeq[Future[void]]()) diff --git a/tests/generics/toverloading_typedesc.nim b/tests/generics/toverloading_typedesc.nim index 5882640f2..94f4d860d 100644 --- a/tests/generics/toverloading_typedesc.nim +++ b/tests/generics/toverloading_typedesc.nim @@ -1,5 +1,6 @@ discard """ exitcode: 0 + disabled: '''true''' """ import moverloading_typedesc import tables diff --git a/tests/rational/trat_init.nim b/tests/rational/trat_init.nim index df29ff6e3..360a48537 100644 --- a/tests/rational/trat_init.nim +++ b/tests/rational/trat_init.nim @@ -1,10 +1,14 @@ discard """ - file: "trat_init.nim" - exitcode: "1" + output: '''true''' """ import rationals var z = Rational[int](num: 0, den: 1) o = initRational(num=1, den=1) a = initRational(1, 2) - r = initRational(1, 0) # this fails - no zero denominator + +try: + var + r = initRational(1, 0) # this fails - no zero denominator +except AssertionError: + echo "true" |