Skip to content

Commit

Permalink
[dylan,tests] Add correct cases to range-5 test
Browse files Browse the repository at this point in the history
* sources/dylan/apple-dylan-test-suite/test-range.dylan
  Add correct cases to range-5 test, in addition to existing incorrect cases
  • Loading branch information
abeaumont committed Mar 21, 2016
1 parent c69f8a7 commit 9a9c16b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sources/dylan/apple-dylan-test-suite/test-range.dylan
Expand Up @@ -47,6 +47,10 @@ define test range-4 (description: "BY:")
end test range-4;

define test range-5 (description: "to:, by:, and size:")
check-true("", range(to: 5, by: 2, size: 3) = #(0, 2, 4));
check-true("", range(to: 6, by: 2, size: 4) = #(0, 2, 4, 6));
check-true("", range(to: -5, by: -2, size: 3) = #(0, -2, -4));
check-true("", range(to: -6, by: -2, size: 4) = #(0, -2, -4, -6));
check-condition("", <error>, range(to: 6, by: 2, size: 3));
check-condition("", <error>, range(to: 6, by: 2, size: 3));
check-condition("", <error>, range(to: -6, by: -2, size: 3));
Expand Down

0 comments on commit 9a9c16b

Please sign in to comment.