From 252f55d1625e2ee4df4d65dbd86a66675a0b3764 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 7 Mar 2008 20:06:23 -0600 Subject: [PATCH] add unit tests to singleton --- extra/singleton/singleton-tests.factor | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 extra/singleton/singleton-tests.factor diff --git a/extra/singleton/singleton-tests.factor b/extra/singleton/singleton-tests.factor new file mode 100644 index 0000000000..1698181ed3 --- /dev/null +++ b/extra/singleton/singleton-tests.factor @@ -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