You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods on Range were not tested to work with empty ranges like 6.to 1 (when the range start is bigger than the end).
For example, to_vector (when fixed) throws java.lang.NegativeArraySizeException: -1, and each runs indefinitely.
Value
Range methods work for empty ranges like 6.to 1
Specification
Fix the to_vector implementation, it should be:
to_vector : Vector.Vector
to_vector = Vector.new (this.end - this.start) (i -> i + this.start)
Add the appropriate test cases for Range methods
Acceptance Criteria & Test Cases
Range methods work for empty ranges
The text was updated successfully, but these errors were encountered:
Summary
Methods on
Range
were not tested to work with empty ranges like6.to 1
(when the range start is bigger than the end).For example,
to_vector
(when fixed) throwsjava.lang.NegativeArraySizeException: -1
, andeach
runs indefinitely.Value
Range methods work for empty ranges like
6.to 1
Specification
to_vector
implementation, it should be:Range
methodsAcceptance Criteria & Test Cases
The text was updated successfully, but these errors were encountered: