Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test ops within ops.
  • Loading branch information
jnthn committed Apr 22, 2012
1 parent 814d395 commit 8475b80
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions t/qast/qast.t
@@ -1,6 +1,6 @@
use QRegex;

plan(4);
plan(5);

sub compile_qast($qast) {
my $post := QAST::Compiler.as_post($qast);
Expand Down Expand Up @@ -45,4 +45,20 @@ is_qast(
)
),
105,
'add_i operation with two IVal nodes');
'add_i operation with two IVal nodes');

is_qast(
QAST::Block.new(
QAST::Op.new(
:op('add_i'),
QAST::IVal.new(:value(10)),
QAST::Op.new(
:op('add_i'),
QAST::IVal.new(:value(20)),
QAST::IVal.new(:value(30))
)
)
),
60,
'an add_i op inside an add_i op');

0 comments on commit 8475b80

Please sign in to comment.