Skip to content

Commit

Permalink
more tests with nan and infinites
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Feb 7, 2023
1 parent 8978d85 commit d51d575
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eo-runtime/src/test/eo/org/eolang/float-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@
10.9
$.equal-to FALSE

[] > float-equal-to-nan-and-infinites-is-false
assert-that > @
and.
(0.0.eq nan).eq FALSE
(0.0.eq positive-infinity).eq FALSE
(0.0.eq negative-infinity).eq FALSE
(42.5.eq nan).eq FALSE
(42.5.eq positive-infinity).eq FALSE
(42.5.eq negative-infinity).eq FALSE
$.equal-to TRUE

[] > zero-eq-to-zero
assert-that > @
eq.
Expand Down
11 changes: 11 additions & 0 deletions eo-runtime/src/test/eo/org/eolang/int-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@
$.equal-to TRUE
"check int.gte.not"

[] > int-equal-to-nan-and-infinites-is-false
assert-that > @
and.
(0.eq nan).eq FALSE
(0.eq positive-infinity).eq FALSE
(0.eq negative-infinity).eq FALSE
(42.eq nan).eq FALSE
(42.eq positive-infinity).eq FALSE
(42.eq negative-infinity).eq FALSE
$.equal-to TRUE

[] > zero-eq-to-zero
assert-that > @
eq.
Expand Down
12 changes: 12 additions & 0 deletions eo-runtime/src/test/eo/org/eolang/string-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@
$.equal-to
"hello".as-hash

[] > compares-string-with-nan-and-infinites
assert-that > @
and.
eq.
eq.
"写褉褍谐" > str
nan
FALSE
(str.eq positive-infinity).eq FALSE
(str.eq negative-infinity).eq FALSE
$.equal-to TRUE

[] > compares-two-strings
assert-that > @
eq.
Expand Down

0 comments on commit d51d575

Please sign in to comment.