add unit tests to singleton

db4
Doug Coleman 2008-03-07 20:06:23 -06:00
parent 1ceeac107b
commit 252f55d162
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
USING: kernel singleton tools.test ;
IN: singleton.tests
[ ] [ SINGLETON: bzzt ] unit-test
[ t ] [ bzzt bzzt? ] unit-test
[ t ] [ bzzt bzzt eq? ] unit-test
GENERIC: zammo ( obj -- )
[ ] [ M: bzzt zammo drop "yes!" ; ] unit-test
[ "yes!" ] [ bzzt zammo ] unit-test