]> gitweb.factorcode.org Git - factor.git/blob - basis/concurrency/futures/futures-tests.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / concurrency / futures / futures-tests.factor
1 USING: concurrency.futures kernel tools.test threads ;
2 IN: concurrency.futures.tests
3
4 [ 50 ] [
5     [ 50 ] future ?future
6 ] unit-test
7
8 [
9     [ "this should propogate" throw ] future ?future 
10 ] must-fail
11
12 [ ] [
13     [ "this should not propogate" throw ] future drop 
14 ] unit-test
15
16 ! Race condition with futures
17 [ 3 3 ] [
18     [ 3 ] future
19     dup ?future swap ?future
20 ] unit-test
21
22 ! Another race
23 [ 3 ] [
24     [ 3 yield ] future ?future
25 ] unit-test