Skip to content

Commit

Permalink
improved tests for assureRange
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Apr 10, 2024
1 parent 2b06774 commit eb7eacf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ within the range as much as possible.
list[&T <: num] assureRange(list[&T <: num] nums, &T <: num low, &T <: num high)
= [assureRange(n, low, high) | n <- nums];

test bool assureRangeListTest() = assureRange([0..10], 100, 110) == [100..110];
test bool assureRangeListTest() = assureRange([0..10], 100, 110) == [100..110];
test bool assureRangeListTestNeg() = assureRange([0..-10], 100, 110) == [100, *[109,108,107,106,105,104,103,102,101]];

0 comments on commit eb7eacf

Please sign in to comment.