Skip to content

Commit

Permalink
added TODO & (temporarily) disabled test
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed Sep 26, 2024
1 parent ebe7d2a commit 1c6cee8
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions tests/unitt/lib/comparison/between.test.art
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,30 @@ suite "Test generic assertions" [


suite "Test numeric-like values" [
; CAUTION: This test seems to be failing randomly
; We have to make sure the results are consistent!

test.prop "start < middle < end, for deterministic operations" [
limit: 100000000
loop permutate.repeated.by:3 numericTypes 'numericType [
middle: to numericType\[1] (random neg limit limit)
start: to numericType\[0] (random neg limit (dec middle))
end: to numericType\[2] (random (inc middle) limit)
; TODO(lib\comparison\between) Test seems to be failing randomly
; We have to make sure the results are consistent and
; re-enable the test
; See also https://github.com/arturo-lang/arturo/issues/1667
; labels: unit-test, bug

; test.prop "start < middle < end, for deterministic operations" [
; limit: 100000000
; loop permutate.repeated.by:3 numericTypes 'numericType [
; middle: to numericType\[1] (random neg limit limit)
; start: to numericType\[0] (random neg limit (dec middle))
; end: to numericType\[2] (random (inc middle) limit)

candidates: @[middle start end]
impreciseOperation: or? ; skips floating-rational and rational-rational
and? (some? candidates => rational?) (some? candidates => floating?)
(every? candidates => rational?)
; candidates: @[middle start end]
; impreciseOperation: or? ; skips floating-rational and rational-rational
; and? (some? candidates => rational?) (some? candidates => floating?)
; (every? candidates => rational?)

if impreciseOperation
-> continue
; if impreciseOperation
; -> continue

assert -> between? middle start end
]
]
; assert -> between? middle start end
; ]
; ]

test "start < middle < end, for :rational and :floating" [
assert -> between? 3:2 1:1 2:1 ; :rational :rational :rational
Expand Down

0 comments on commit 1c6cee8

Please sign in to comment.