Skip to content

Commit 4068cef

Browse files
committed
adjust tests
1 parent de66164 commit 4068cef

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

t/p5regex/01-p5regex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sub test_line($line) {
3939

4040
my $rxcomp := pir::compreg__Ps('QRegex::P5Regex');
4141
try {
42-
my $rxsub := $rxcomp.compile($regex).main_sub();
42+
my $rxsub := $rxcomp.compile($regex);
4343
my $cursor := NQPCursor."!cursor_init"($target, :c(0));
4444
my $match := $rxsub($cursor).MATCH;
4545
if $expect_substr {

t/qast/pirt.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ sub is_pirt_result($producer, $expected, $desc) {
66
my $pirt := $producer();
77
my $pir := $pirt.pir();
88
#say($pir);
9-
my $sub := QAST::Compiler.compile_and_init($pir).main_sub();
9+
my $pbc := QAST::Compiler.pbc($pir);
10+
my $sub := QAST::Compiler.init($pbc);
1011
ok($sub() eq $expected, $desc);
1112
}
1213

t/qast/qast.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ sub compile_qast($qast) {
77
my $*QAST_BLOCK_NO_CLOSE := 1;
88
my $pirt := QAST::Compiler.as_post($qast);
99
my $pir := $pirt.pir();
10-
QAST::Compiler.compile_and_init($pir).main_sub();
10+
my $pbc := QAST::Compiler.pbc($pir);
11+
QAST::Compiler.init($pbc);
1112
}
1213
sub is_qast($qast, $value, $desc) {
1314
try {

t/qregex/01-qregex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sub test_line($line) {
4545

4646
my $rxcomp := pir::compreg__Ps('QRegex::P6Regex');
4747
try {
48-
my $rxsub := $rxcomp.compile($regex).main_sub();
48+
my $rxsub := $rxcomp.compile($regex);
4949
my $cursor := NQPCursor."!cursor_init"($target, :c(0));
5050
my $match := $rxsub($cursor).MATCH;
5151
if $expect_substr {

0 commit comments

Comments
 (0)