]> gitweb.factorcode.org Git - factor.git/commitdiff
Add promises unit tests
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Mar 2009 02:42:23 +0000 (21:42 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Mar 2009 02:42:23 +0000 (21:42 -0500)
extra/promises/promises-tests.factor [new file with mode: 0644]

diff --git a/extra/promises/promises-tests.factor b/extra/promises/promises-tests.factor
new file mode 100644 (file)
index 0000000..79e7dc5
--- /dev/null
@@ -0,0 +1,7 @@
+IN: promises.tests
+USING: promises math tools.test ;
+
+LAZY: lazy-test ( a -- b ) 1 + ;
+
+{ 1 1 } [ lazy-test ] must-infer-as
+[ 3 ] [ 2 lazy-test force ] unit-test
\ No newline at end of file