Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lib\comparison\between] Test seems to be failing randomly #1740

Open
github-actions bot opened this issue Sep 26, 2024 · 0 comments
Open

[lib\comparison\between] Test seems to be failing randomly #1740

github-actions bot opened this issue Sep 26, 2024 · 0 comments
Labels
bug Something isn't working todo Automatically generated issues from TODOs in the code unit-test Unit tests

Comments

@github-actions
Copy link

We have to make sure the results are consistent and

re-enable the test

See also https://github\.com/arturo\-lang/arturo/issues/1667

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)

impreciseOperation: or? ; skips floating-rational and rational-rational

and? (some? candidates => rational?) (some? candidates => floating?)

(every? candidates => rational?)

-> continue

]

]

; TODO(lib\comparison\between) Test seems to be failing randomly




suite "Test numeric-like values" [
    ; 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?)

    ;         if impreciseOperation
    ;             -> continue
            
    ;         assert -> between? middle start end
    ;     ]
    ; ]

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

@github-actions github-actions bot added bug Something isn't working todo Automatically generated issues from TODOs in the code unit-test Unit tests labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo Automatically generated issues from TODOs in the code unit-test Unit tests
Projects
None yet
Development

No branches or pull requests

0 participants