diff options
author | Simon Hafner <hafnersimon@gmail.com> | 2014-02-06 14:55:05 -0600 |
---|---|---|
committer | Simon Hafner <hafnersimon@gmail.com> | 2014-02-06 14:55:05 -0600 |
commit | 75f232eb6efa1d213ca84c524ee9119da128d6e3 (patch) | |
tree | 2f5b101d3d08b2f39eac578932636028834ddfe9 /tests/stdlib | |
parent | afb7bc0e6329a3833d7e71719840378714e19fe2 (diff) | |
download | Nim-75f232eb6efa1d213ca84c524ee9119da128d6e3.tar.gz |
removed unittest from talgorithm
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/talgorithm.nim | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/stdlib/talgorithm.nim b/tests/stdlib/talgorithm.nim index 37de1262f..7ab652c82 100644 --- a/tests/stdlib/talgorithm.nim +++ b/tests/stdlib/talgorithm.nim @@ -1,14 +1,8 @@ -import unittest import algorithm -suite "product": - test "empty input": - check product[int](newSeq[seq[int]]()) == newSeq[seq[int]]() - test "bit more empty input": - check product[int](@[newSeq[int](), @[], @[]]) == newSeq[seq[int]]() - test "a simple case of one element": - check product(@[@[1,2]]) == @[@[1,2]] - test "two elements": - check product(@[@[1,2], @[3,4]]) == @[@[2,4],@[1,4],@[2,3],@[1,3]] - test "three elements": - check product(@[@[1,2], @[3,4], @[5,6]]) == @[@[2,4,6],@[1,4,6],@[2,3,6],@[1,3,6], @[2,4,5],@[1,4,5],@[2,3,5],@[1,3,5]] +doAssert product[int](newSeq[seq[int]]()) == newSeq[seq[int]](), "empty input" +doAssert product[int](@[newSeq[int](), @[], @[]]) == newSeq[seq[int]](), "bit more empty input" +doAssert product(@[@[1,2]]) == @[@[1,2]], "a simple case of one element" +doAssert product(@[@[1,2], @[3,4]]) == @[@[2,4],@[1,4],@[2,3],@[1,3]], "two elements" +doAssert product(@[@[1,2], @[3,4], @[5,6]]) == @[@[2,4,6],@[1,4,6],@[2,3,6],@[1,3,6], @[2,4,5],@[1,4,5],@[2,3,5],@[1,3,5]], "three elements" +doAssert product(@[@[1,2], @[]]) == newSeq[seq[int]](), "two elements, but one empty" |