Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test to make sure dependency tests aren't just coincidentally cor…

…rect.
  • Loading branch information...
commit 3d6c374af1f9fb0e9d32c036af525802d04cb511 1 parent 3a3f017
tcurtis authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 t/tree-optimizer.t
View
9 t/tree-optimizer.t
@@ -2,7 +2,7 @@
pir::load_bytecode('Tree/Optimizer.pbc');
-plan(8);
+plan(9);
{
my $opt := Tree::Optimizer.new;
@@ -56,6 +56,13 @@ plan(8);
ok($opt.run(2) == -4,
'Correct order when registering a pass after its dependency.');
}
+ {
+ my $opt := Tree::Optimizer.new;
+ $opt.register(&negate, :name<negate>);
+ $opt.register(&square, :depends-on<negate>);
+ ok($opt.run(2) == 4,
+ 'Correct order is not coincidental.');
+ }
}
# Local Variables:
Please sign in to comment.
Something went wrong with that request. Please try again.