Skip to content

Commit

Permalink
[tests] more tests for null and null
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Apr 22, 2024
1 parent cf97344 commit 2455d35
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/unit/src/unit/TestOps.hx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ class TestOps extends Test {

t(null == nullInt);
t(nullInt == null);
f(null != nullInt);
f(nullInt != null);

f(null > nullInt);
f(null >= nullInt);
f(null < nullInt);
f(null <= nullInt);

f(nullInt > null);
f(nullInt >= null);
f(nullInt < null);
f(nullInt <= null);

f(0 == nullInt);
f(nullInt == 0);
t(0 != nullInt);
Expand Down Expand Up @@ -270,6 +283,19 @@ class TestOps extends Test {

t(null == nullFloat);
t(nullFloat == null);
f(null != nullFloat);
f(nullFloat != null);

f(null > nullFloat);
f(null >= nullFloat);
f(null < nullFloat);
f(null <= nullFloat);

f(nullFloat > null);
f(nullFloat >= null);
f(nullFloat < null);
f(nullFloat <= null);

f(0. == nullFloat);
f(nullFloat == 0.);
t(0. != nullFloat);
Expand Down

0 comments on commit 2455d35

Please sign in to comment.