factor/core/classes/singleton/singleton-tests.factor

20 lines
644 B
Factor
Raw Normal View History

2008-04-01 19:02:39 -04:00
USING: kernel classes.singleton tools.test prettyprint io.streams.string ;
2008-04-01 17:51:48 -04:00
IN: classes.singleton.tests
2008-03-07 21:06:23 -05:00
[ ] [ SINGLETON: bzzt ] unit-test
[ t ] [ bzzt bzzt? ] unit-test
[ t ] [ bzzt bzzt eq? ] unit-test
2008-04-02 14:13:56 -04:00
GENERIC: zammo ( obj -- str )
2008-03-07 21:06:23 -05:00
[ ] [ M: bzzt zammo drop "yes!" ; ] unit-test
[ "yes!" ] [ bzzt zammo ] unit-test
2008-04-01 17:46:22 -04:00
[ ] [ SINGLETON: omg ] unit-test
2008-04-02 16:41:29 -04:00
[ t ] [ omg singleton-class? ] unit-test
2008-04-02 14:11:55 -04:00
[ "IN: classes.singleton.tests\nSINGLETON: omg\n" ] [ [ omg see ] with-string-writer ] unit-test
2008-05-10 19:09:10 -04:00
SINGLETON: word-and-singleton
: word-and-singleton 3 ;
[ t ] [ \ word-and-singleton word-and-singleton? ] unit-test
[ 3 ] [ word-and-singleton ] unit-test