Skip to content

Commit

Permalink
Test numifying 'NaN', 'Inf', '-Inf' and '+Inf'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Apr 27, 2017
1 parent 02bdfce commit 4954f24
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/nqp/109-coercions.t
@@ -0,0 +1,10 @@
plan(4);

my sub isnan($n) {
nqp::isnanorinf($n) && $n != nqp::inf() && $n != nqp::neginf();
}

ok(isnan(+'NaN'), 'numifying NaN');
ok(+'Inf' == nqp::inf, 'numifying Inf');
ok(+'+Inf' == nqp::inf, 'numifying +Inf');
ok(+'-Inf' == nqp::neginf, 'numifying -Inf');

0 comments on commit 4954f24

Please sign in to comment.