Unit tests for a couple of serious compiler bugs

Daniel Ehrenberg 2010-06-22 16:41:14 -04:00
parent 3772379a75
commit ab3ed0960b
1 changed files with 8 additions and 1 deletions

View File

@ -4,7 +4,8 @@ sbufs strings tools.test vectors words sequences.private
quotations classes classes.algebra classes.tuple.private quotations classes classes.algebra classes.tuple.private
continuations growable namespaces hints alien.accessors continuations growable namespaces hints alien.accessors
compiler.tree.builder compiler.tree.optimizer sequences.deep compiler.tree.builder compiler.tree.optimizer sequences.deep
compiler.test definitions generic.single shuffle math.order ; compiler.test definitions generic.single shuffle math.order
compiler.cfg.debugger ;
IN: compiler.tests.optimizer IN: compiler.tests.optimizer
GENERIC: xyz ( obj -- obj ) GENERIC: xyz ( obj -- obj )
@ -440,3 +441,9 @@ TUPLE: grid-mesh-tuple { length read-only } { step read-only } ;
] keep ; ] keep ;
[ { 0.5 } ] [ grid-mesh-test-case ] unit-test [ { 0.5 } ] [ grid-mesh-test-case ] unit-test
[ { 1 } "bar" ] [ { 1 } [ [ [ [ "foo" throw ] [ "bar" throw ] recover ] attempt-all f ] [ ] recover ] compile-call ] unit-test
GENERIC: bad-push-test-case ( a -- b )
M: object bad-push-test-case "foo" throw ; inline
[ { 1 } "bar" ] [ { 1 } [ [ [ [ bad-push-test-case ] [ "bar" throw ] recover ] attempt-all f ] [ ] recover ] compile-call ] unit-test