mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Check that the tests distinguish 0.0 and -0.0.
This commit is contained in:
parent
7ca81020a0
commit
a68bbeac23
1 changed files with 5 additions and 0 deletions
|
@ -520,6 +520,11 @@ def do_tests():
|
||||||
test('reallyequal(NaN, -Indet, 0.0)', True)
|
test('reallyequal(NaN, -Indet, 0.0)', True)
|
||||||
test('reallyequal(NaN, -(Infinity*0), 0.0)', True)
|
test('reallyequal(NaN, -(Infinity*0), 0.0)', True)
|
||||||
test('reallyequal(Infinity*0, Indet, 0.0)', True)
|
test('reallyequal(Infinity*0, Indet, 0.0)', True)
|
||||||
|
# Check that it properly distinguishes -0.0 and 0.0
|
||||||
|
test('reallyequal(-0.0, 0.0, 0.0)', False)
|
||||||
|
test('reallyequal(0.0, -0.0, 0.0)', False)
|
||||||
|
test('reallyequal(0.0, 0.0, 0.0)', True)
|
||||||
|
test('reallyequal(-0.0, -0.0, 0.0)', True)
|
||||||
|
|
||||||
shouldexcept('div(1.0, 0.0)', ELSLMathError)
|
shouldexcept('div(1.0, 0.0)', ELSLMathError)
|
||||||
shouldexcept('div(1, 0)', ELSLMathError)
|
shouldexcept('div(1, 0)', ELSLMathError)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue