Skip to content

Commit

Permalink
Test nqp::cmp_n with nqp::nan
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Sep 21, 2017
1 parent 16d135c commit 5ab6d35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/nqp/059-nqpop.t
Expand Up @@ -2,7 +2,7 @@

# Test nqp::op pseudo-functions.

plan(328);
plan(330);

ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
ok( nqp::sub_i(5,2) == 3, 'nqp::sub_i');
Expand Down Expand Up @@ -98,6 +98,9 @@ ok( nqp::cmp_i(2, 0) == 1, 'nqp::cmp_i');
ok( nqp::cmp_i(2, 2) == 0, 'nqp::cmp_i');
ok( nqp::cmp_i(2, 5) == -1, 'nqp::cmp_i');

ok( nqp::cmp_n(10, nqp::nan) == 0, 'nqp::cmp_n with nan as left argument');
ok( nqp::cmp_n(nqp::nan, 10) == 0, 'nqp::cmp_n with nan as right argument');

ok( nqp::cmp_n(2.5, 0.5) == 1, 'nqp::cmp_n');
ok( nqp::cmp_n(2.5, 2.5) == 0, 'nqp::cmp_n');
ok( nqp::cmp_n(2.5, 5.0) == -1, 'nqp::cmp_n');
Expand Down

0 comments on commit 5ab6d35

Please sign in to comment.