]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tests/redefine3.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / compiler / tests / redefine3.factor
1 USING: accessors compiler compiler.units tools.test math parser
2 kernel sequences sequences.private classes.mixin generic
3 definitions arrays words assocs eval ;
4 IN: compiler.tests.redefine3
5
6 GENERIC: sheeple ( obj -- x )
7
8 M: object sheeple drop "sheeple" ;
9
10 MIXIN: empty-mixin
11
12 M: empty-mixin sheeple drop "wake up" ;
13
14 : sheeple-test ( -- string ) { } sheeple ;
15
16 [ "sheeple" ] [ sheeple-test ] unit-test
17 [ t ] [ \ sheeple-test optimized? ] unit-test
18 [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
19 [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
20
21 [ ] [ "IN: compiler.tests.redefine3 USE: arrays INSTANCE: array empty-mixin" eval( -- ) ] unit-test
22
23 [ "wake up" ] [ sheeple-test ] unit-test
24 [ f ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
25 [ t ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
26
27 [ ] [ [ array empty-mixin remove-mixin-instance ] with-compilation-unit ] unit-test
28
29 [ "sheeple" ] [ sheeple-test ] unit-test
30 [ t ] [ \ sheeple-test optimized? ] unit-test
31 [ t ] [ object \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test
32 [ f ] [ empty-mixin \ sheeple method \ sheeple-test "compiled-uses" word-prop key? ] unit-test