Skip to content

Commit 289faef

Browse files
committed
Merge pull request #80 from kboga/pir-to-nqp-in-tests
pir -> nqp for tests
2 parents 1699647 + 9fe5009 commit 289faef

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

t/p5regex/01-p5regex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sub test_line($line) {
3434
$target := unescape($target);
3535

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

4040
my $rxcomp := nqp::getcomp('QRegex::P5Regex');

t/qregex/01-qregex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sub test_line($line) {
4040
$target := unescape($target);
4141

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

4646
my $rxcomp := nqp::getcomp('QRegex::P6Regex');

t/serialization/02-types.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ sub add_to_sc($sc, $idx, $obj) {
121121
my $m2 := method () { "Hi, I'm " ~ nqp::getattr(self, self.WHAT, '$!name') };
122122
nqp::scsetcode($sc, 0, $m1);
123123
nqp::scsetcode($sc, 1, $m2);
124-
pir::setprop__vPsP($m1, 'STATIC_CODE_REF', $m1);
125-
pir::setprop__vPsP($m2, 'STATIC_CODE_REF', $m2);
124+
nqp::markcodestatic($m1);
125+
nqp::markcodestatic($m2);
126126

127127
my $type := NQPClassHOW.new_type(:name('Llama'), :repr('P6opaque'));
128128
$type.HOW.add_attribute($type, NQPAttribute.new(name => '$!name'));

t/serialization/03-closures.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sub add_to_sc($sc, $idx, $obj) {
1717

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

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

6060
nqp::scsetcode($sc, 0, $raw_sub);
61-
pir::setprop__vPsP($raw_sub, 'STATIC_CODE_REF', $raw_sub);
61+
nqp::markcodestatic($raw_sub);
6262

6363
my $raw_meth := $m1.get_lexinfo().get_static_code();
6464
nqp::scsetcode($sc, 1, $raw_meth);
65-
pir::setprop__vPsP($raw_meth, 'STATIC_CODE_REF', $raw_meth);
65+
nqp::markcodestatic($raw_meth);
6666

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

0 commit comments

Comments
 (0)