]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/concurrency/mailboxes/mailboxes-tests.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / concurrency / mailboxes / mailboxes-tests.factor
old mode 100755 (executable)
new mode 100644 (file)
index 61c57bb..56d579d
@@ -1,7 +1,9 @@
-IN: concurrency.mailboxes.tests\r
-USING: concurrency.mailboxes concurrency.count-downs vectors\r
-sequences threads tools.test math kernel strings namespaces\r
+USING: concurrency.mailboxes concurrency.count-downs concurrency.conditions\r
+vectors sequences threads tools.test math kernel strings namespaces\r
 continuations calendar destructors ;\r
+IN: concurrency.mailboxes.tests\r
+\r
+{ 1 1 } [ [ integer? ] mailbox-get? ] must-infer-as\r
 \r
 [ V{ 1 2 3 } ] [\r
     0 <vector>\r
@@ -73,3 +75,15 @@ continuations calendar destructors ;
 [ ] [ "d" get 5 seconds await-timeout ] unit-test\r
 \r
 [ ] [ "m" get dispose ] unit-test\r
+\r
+[ { "foo" "bar" } ] [\r
+    <mailbox>\r
+    "foo" over mailbox-put\r
+    "bar" over mailbox-put\r
+    mailbox-get-all\r
+] unit-test\r
+\r
+[\r
+    <mailbox> 1 seconds mailbox-get-timeout\r
+] [ wait-timeout? ] must-fail-with\r
+    \r