Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #80 from kboga/pir-to-nqp-in-tests
pir -> nqp for tests
  • Loading branch information
jnthn committed Feb 24, 2013
2 parents 1699647 + 9fe5009 commit 289faef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion t/p5regex/01-p5regex.t
Expand Up @@ -34,7 +34,7 @@ sub test_line($line) {
$target := unescape($target);

my $expect_substr := nqp::substr($expect, 0, 1) eq '<'
?? pir::chopn__Ssi(nqp::substr($expect, 1), 1)
?? nqp::substr($expect, 1, nqp::chars($expect) - 2)
!! '';

my $rxcomp := nqp::getcomp('QRegex::P5Regex');
Expand Down
2 changes: 1 addition & 1 deletion t/qregex/01-qregex.t
Expand Up @@ -40,7 +40,7 @@ sub test_line($line) {
$target := unescape($target);

my $expect_substr := nqp::substr($expect, 0, 1) eq '<'
?? pir::chopn__Ssi(nqp::substr($expect, 1), 1)
?? nqp::substr($expect, 1, nqp::chars($expect) - 2)
!! '';

my $rxcomp := nqp::getcomp('QRegex::P6Regex');
Expand Down
4 changes: 2 additions & 2 deletions t/serialization/02-types.t
Expand Up @@ -121,8 +121,8 @@ sub add_to_sc($sc, $idx, $obj) {
my $m2 := method () { "Hi, I'm " ~ nqp::getattr(self, self.WHAT, '$!name') };
nqp::scsetcode($sc, 0, $m1);
nqp::scsetcode($sc, 1, $m2);
pir::setprop__vPsP($m1, 'STATIC_CODE_REF', $m1);
pir::setprop__vPsP($m2, 'STATIC_CODE_REF', $m2);
nqp::markcodestatic($m1);
nqp::markcodestatic($m2);

my $type := NQPClassHOW.new_type(:name('Llama'), :repr('P6opaque'));
$type.HOW.add_attribute($type, NQPAttribute.new(name => '$!name'));
Expand Down
6 changes: 3 additions & 3 deletions t/serialization/03-closures.t
Expand Up @@ -17,7 +17,7 @@ sub add_to_sc($sc, $idx, $obj) {

my $m1 := (method () { "success!" }).get_lexinfo().get_static_code();
nqp::scsetcode($sc, 0, $m1);
pir::setprop__vPsP($m1, 'STATIC_CODE_REF', $m1);
nqp::markcodestatic($m1);

# Here we make a clone of it, which is what we're testing.
my $m2 := nqp::clone($m1);
Expand Down Expand Up @@ -58,11 +58,11 @@ sub add_to_sc($sc, $idx, $obj) {
$raw_sub('XXX');

nqp::scsetcode($sc, 0, $raw_sub);
pir::setprop__vPsP($raw_sub, 'STATIC_CODE_REF', $raw_sub);
nqp::markcodestatic($raw_sub);

my $raw_meth := $m1.get_lexinfo().get_static_code();
nqp::scsetcode($sc, 1, $raw_meth);
pir::setprop__vPsP($raw_meth, 'STATIC_CODE_REF', $raw_meth);
nqp::markcodestatic($raw_meth);

my $type1 := nqp::knowhow().new_type(:name('RoleLikeTest1'), :repr('P6opaque'));
$type1.HOW.add_method($type1, 'm', $m1);
Expand Down

0 comments on commit 289faef

Please sign in to comment.