diff options
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tstdlib_various.nim | 18 | ||||
-rw-r--r-- | tests/stdlib/tunittest.nim | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/stdlib/tstdlib_various.nim b/tests/stdlib/tstdlib_various.nim index 42ed4fda2..cddd43f6e 100644 --- a/tests/stdlib/tstdlib_various.nim +++ b/tests/stdlib/tstdlib_various.nim @@ -60,15 +60,15 @@ block tcritbits: block testequivalence: - doAssert(toSet(@[1,2,3]) <= toSet(@[1,2,3,4]), "equivalent or subset") - doAssert(toSet(@[1,2,3]) <= toSet(@[1,2,3]), "equivalent or subset") - doAssert((not(toSet(@[1,2,3]) <= toSet(@[1,2]))), "equivalent or subset") - doAssert(toSet(@[1,2,3]) <= toSet(@[1,2,3,4]), "strict subset") - doAssert((not(toSet(@[1,2,3]) < toSet(@[1,2,3]))), "strict subset") - doAssert((not(toSet(@[1,2,3]) < toSet(@[1,2]))), "strict subset") - doAssert((not(toSet(@[1,2,3]) == toSet(@[1,2,3,4]))), "==") - doAssert(toSet(@[1,2,3]) == toSet(@[1,2,3]), "==") - doAssert((not(toSet(@[1,2,3]) == toSet(@[1,2]))), "==") + doAssert(toHashSet(@[1,2,3]) <= toHashSet(@[1,2,3,4]), "equivalent or subset") + doAssert(toHashSet(@[1,2,3]) <= toHashSet(@[1,2,3]), "equivalent or subset") + doAssert((not(toHashSet(@[1,2,3]) <= toHashSet(@[1,2]))), "equivalent or subset") + doAssert(toHashSet(@[1,2,3]) <= toHashSet(@[1,2,3,4]), "strict subset") + doAssert((not(toHashSet(@[1,2,3]) < toHashSet(@[1,2,3]))), "strict subset") + doAssert((not(toHashSet(@[1,2,3]) < toHashSet(@[1,2]))), "strict subset") + doAssert((not(toHashSet(@[1,2,3]) == toHashSet(@[1,2,3,4]))), "==") + doAssert(toHashSet(@[1,2,3]) == toHashSet(@[1,2,3]), "==") + doAssert((not(toHashSet(@[1,2,3]) == toHashSet(@[1,2]))), "==") diff --git a/tests/stdlib/tunittest.nim b/tests/stdlib/tunittest.nim index b0efdb617..9ef689e32 100644 --- a/tests/stdlib/tunittest.nim +++ b/tests/stdlib/tunittest.nim @@ -47,10 +47,10 @@ test "unittest multiple requires": require(true) -import math, random +import random from strutils import parseInt proc defectiveRobot() = - case random(1..4) + case rand(1..4) of 1: raise newException(OSError, "CANNOT COMPUTE!") of 2: discard parseInt("Hello World!") of 3: raise newException(IOError, "I can't do that Dave.") |