diff options
| author | Michael Bebenita <[email protected]> | 2010-08-11 15:05:33 -0700 |
|---|---|---|
| committer | Michael Bebenita <[email protected]> | 2010-08-11 16:08:45 -0700 |
| commit | 8ac15c684481ea5b60f85c3f57b63e89a261e7dd (patch) | |
| tree | 46755714cf321a466d08926b3b62e7d8c61db0d2 | |
| parent | Made ref_count a word sized value. (diff) | |
| download | rust-8ac15c684481ea5b60f85c3f57b63e89a261e7dd.tar.xz rust-8ac15c684481ea5b60f85c3f57b63e89a261e7dd.zip | |
Added test cases.
| -rw-r--r-- | src/Makefile | 3 | ||||
| -rw-r--r-- | src/test/run-pass/task-comm-10.rs | 16 | ||||
| -rw-r--r-- | src/test/run-pass/task-comm-11.rs | 10 | ||||
| -rw-r--r-- | src/test/run-pass/task-life-0.rs | 7 |
4 files changed, 36 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index 2e8deb7b..63834799 100644 --- a/src/Makefile +++ b/src/Makefile @@ -381,6 +381,9 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \ test/run-pass/task-comm-7.rs \ test/run-pass/task-comm-8.rs \ test/run-pass/task-comm-9.rs \ + test/run-pass/task-comm-10.rs \ + test/run-pass/task-comm-11.rs \ + test/run-pass/task-life-0.rs \ test/run-pass/task-comm.rs \ test/run-pass/threads.rs \ test/run-pass/yield.rs diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs new file mode 100644 index 00000000..529ef6f5 --- /dev/null +++ b/src/test/run-pass/task-comm-10.rs @@ -0,0 +1,16 @@ +io fn start(chan[chan[str]] c) { + let port[str] p = port(); + c <| chan(p); + auto a <- p; + auto b <- p; + // Never read the second string. +} + +io fn main() { + let port[chan[str]] p = port(); + auto child = spawn "start" start(chan(p)); + auto c <- p; + c <| "A"; + c <| "B"; + yield; +}
\ No newline at end of file diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs new file mode 100644 index 00000000..519eb699 --- /dev/null +++ b/src/test/run-pass/task-comm-11.rs @@ -0,0 +1,10 @@ +io fn start(chan[chan[str]] c) { + let port[str] p = port(); + c <| chan(p); +} + +io fn main() { + let port[chan[str]] p = port(); + auto child = spawn "child" start(chan(p)); + auto c <- p; +}
\ No newline at end of file diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs new file mode 100644 index 00000000..f15792fb --- /dev/null +++ b/src/test/run-pass/task-life-0.rs @@ -0,0 +1,7 @@ +fn main() -> () { + spawn child("Hello"); +} + +fn child(str s) { + +}
\ No newline at end of file |