From 7ad13392bde8b47415ecf4e685e499a2201ad278 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Fri, 12 Aug 2011 17:03:48 -0700 Subject: [PATCH] Converted two more spawn tests. --- src/test/run-pass/spawn-types.rs | 9 +++++++-- src/test/run-pass/spawn2.rs | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/test/run-pass/spawn-types.rs b/src/test/run-pass/spawn-types.rs index e99006273d53..6fb0b60ac5d5 100644 --- a/src/test/run-pass/spawn-types.rs +++ b/src/test/run-pass/spawn-types.rs @@ -7,9 +7,14 @@ use std; import std::str; +import std::comm; +import std::task; -type ctx = chan[int]; +type ctx = comm::chan_t[int]; fn iotask(cx: ctx, ip: str) { assert (str::eq(ip, "localhost")); } -fn main() { let p: port[int] = port(); spawn iotask(chan(p), "localhost"); } \ No newline at end of file +fn main() { + let p = comm::mk_port[int](); + task::_spawn(bind iotask(p.mk_chan2(), "localhost")); +} diff --git a/src/test/run-pass/spawn2.rs b/src/test/run-pass/spawn2.rs index a0488fafaba9..cbc53ad4a9df 100644 --- a/src/test/run-pass/spawn2.rs +++ b/src/test/run-pass/spawn2.rs @@ -1,6 +1,9 @@ // -*- rust -*- -fn main() { spawn child(10, 20, 30, 40, 50, 60, 70, 80, 90); } +use std; +import std::task::_spawn; + +fn main() { _spawn(bind child(10, 20, 30, 40, 50, 60, 70, 80, 90)); } fn child(i1: int, i2: int, i3: int, i4: int, i5: int, i6: int, i7: int, i8: int, i9: int) {