Skip to content

Commit

Permalink
Add tests for isnull for things that aren't nulls.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Feb 16, 2013
1 parent ba13a07 commit d579a30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/nqp/59-nqpop.t
Expand Up @@ -2,7 +2,7 @@

# Test nqp::op pseudo-functions.

plan(121);
plan(123);


ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
Expand Down Expand Up @@ -95,6 +95,8 @@ ok( nqp::not_i(1) == 0, 'nqp::not_i');
ok( nqp::not_i(-1) == 0, 'nqp::not_i');

ok( nqp::isnull(nqp::null()) == 1, 'nqp::isnull/nqp::null' );
ok( nqp::isnull("hello") == 0, '!nqp::isnull(string)' );
ok( nqp::isnull(13232) == 0, 'nqp::isnull(number)' );

ok( nqp::istrue(0) == 0, 'nqp::istrue');
ok( nqp::istrue(1) == 1, 'nqp::istrue');
Expand Down

0 comments on commit d579a30

Please sign in to comment.