From ea2d02f248d6280f9b56fc2009ffe445d08c8d71 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 27 Aug 2008 16:25:37 -0500 Subject: [PATCH] Add some failing tests --- basis/compiler/tests/redefine4.factor | 12 ++++++++++++ .../tree/propagation/propagation-tests.factor | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 basis/compiler/tests/redefine4.factor diff --git a/basis/compiler/tests/redefine4.factor b/basis/compiler/tests/redefine4.factor new file mode 100644 index 0000000000..2c667eaceb --- /dev/null +++ b/basis/compiler/tests/redefine4.factor @@ -0,0 +1,12 @@ +IN: compiler.tests +USING: io.streams.string kernel tools.test eval ; + +: declaration-test-1 ( -- a ) 3 ; flushable + +: declaration-test ( -- ) declaration-test-1 drop ; + +[ "" ] [ [ declaration-test ] with-string-writer ] unit-test + +[ ] [ "IN: compiler.tests USE: io : declaration-test-1 ( -- a ) \"X\" print f ;" eval ] unit-test + +[ "X" ] [ [ declaration-test ] with-string-writer ] unit-test diff --git a/basis/compiler/tree/propagation/propagation-tests.factor b/basis/compiler/tree/propagation/propagation-tests.factor index 149a9e1a88..da68503c1e 100644 --- a/basis/compiler/tree/propagation/propagation-tests.factor +++ b/basis/compiler/tree/propagation/propagation-tests.factor @@ -565,6 +565,12 @@ M: integer infinite-loop infinite-loop ; [ ] [ [ too-deep ] final-info drop ] unit-test +[ ] [ [ reversed boa slice boa nth-unsafe * ] final-info drop ] unit-test + +MIXIN: empty-mixin + +[ ] [ [ { empty-mixin } declare empty-mixin? ] final-info drop ] unit-test + ! [ V{ string } ] [ ! [ dup string? t xor [ "A" throw ] [ ] if ] final-classes ! ] unit-test