Fix #2. Finish implementing Range.
Covers error and edge cases and fully tested now.
This commit is contained in:
+4
-4
@@ -12,11 +12,11 @@ IO.print((3..-5).max) // expect: 3
|
||||
IO.print((-2..-5).max) // expect: -2
|
||||
|
||||
// Exclusive ordered range.
|
||||
IO.print((2...5).max) // expect: 4
|
||||
IO.print((2...5).max) // expect: 5
|
||||
IO.print((3...3).max) // expect: 3
|
||||
IO.print((0...3).max) // expect: 2
|
||||
IO.print((-5...3).max) // expect: 2
|
||||
IO.print((-5...-2).max) // expect: -3
|
||||
IO.print((0...3).max) // expect: 3
|
||||
IO.print((-5...3).max) // expect: 3
|
||||
IO.print((-5...-2).max) // expect: -2
|
||||
|
||||
// Exclusive backwards range.
|
||||
IO.print((5...2).max) // expect: 5
|
||||
|
||||
Reference in New Issue
Block a user