Navigation Menu

Skip to content

Commit

Permalink
Add tests for nqp::setelems.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Feb 7, 2015
1 parent 824ea1a commit d84ee2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions t/nqp/59-nqpop.t
Expand Up @@ -2,7 +2,7 @@

# Test nqp::op pseudo-functions.

plan(122);
plan(124);


ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
Expand Down Expand Up @@ -184,6 +184,7 @@ ok(nqp::eqat("foobar","foobarbaz", 0) == 0, "eqat with needle argument longer th

{
my $list := nqp::list("1","2","3","4","5");
nqp::setelems($list, 3);
ok(nqp::join(",", $list) eq '1,2,3')
my $ret := nqp::setelems($list, 3);
ok(nqp::join(",", $list) eq '1,2,3', 'nqp::setelems reduces list length properly');
ok(nqp::join(",", $ret) eq '1,2,3', 'nqp::setelems return value');
}

0 comments on commit d84ee2f

Please sign in to comment.