Skip to content

Commit

Permalink
Add a test for QAST::VM.new( parrot => ... ).
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 30, 2012
1 parent f108c28 commit 7be3296
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions t/qast/qast.t
@@ -1,6 +1,6 @@
use QAST;

plan(63);
plan(64);

# Following a test infrastructure.
sub compile_qast($qast) {
Expand Down Expand Up @@ -918,4 +918,14 @@ test_qast_result(
ok(SCTest.pre, 'pre-deserialize OK');
ok(SCTest.post, 'post-deserialize OK');
ok(SCTest.main, 'mainline OK');
});
});

is_qast(
QAST::Block.new(
QAST::VM.new(
parrot => QAST::IVal.new( :value(42) ),
unknown => QAST::IVal.new( :value(69) )
)
),
42,
'QAST::VM picks parrot alternative and ignores others');

0 comments on commit 7be3296

Please sign in to comment.