Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test isconcrete.
  • Loading branch information
jnthn committed Jan 6, 2013
1 parent c966654 commit 3894a9e
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion t/qast_6model.t
@@ -1,6 +1,6 @@
use helper;

plan(6);
plan(7);

qast_test(
-> {
Expand Down Expand Up @@ -319,3 +319,56 @@ qast_test(
},
"13\n3.14\nDrop bear!\n",
"Boxing/unboxing of boot types");

qast_test(
-> {
my $block := QAST::Block.new(
QAST::Stmts.new(
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new( :op('knowhow') )
)),
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new(
:op('create'),
QAST::Op.new( :op('knowhow') )
))),
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new( :op('list') )
)),
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new( :op('hash') )
)),
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new( :op('bootarray') )
)),
QAST::Op.new(
:op('say'),
QAST::Op.new(
:op('isconcrete'),
QAST::Op.new( :op('boothash') )
)),
));
QAST::CompUnit.new(
$block,
:main(QAST::Op.new(
:op('call'),
QAST::BVal.new( :value($block) )
)))
},
"0\n1\n1\n1\n0\n0\n",
"isconcrete works");

0 comments on commit 3894a9e

Please sign in to comment.