Skip to content

Commit 7ad1339

Browse files
author
Eric Holk
committed
Converted two more spawn tests.
1 parent b9f1f77 commit 7ad1339

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/test/run-pass/spawn-types.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
use std;
88

99
import std::str;
10+
import std::comm;
11+
import std::task;
1012

11-
type ctx = chan[int];
13+
type ctx = comm::chan_t[int];
1214

1315
fn iotask(cx: ctx, ip: str) { assert (str::eq(ip, "localhost")); }
1416

15-
fn main() { let p: port[int] = port(); spawn iotask(chan(p), "localhost"); }
17+
fn main() {
18+
let p = comm::mk_port[int]();
19+
task::_spawn(bind iotask(p.mk_chan2(), "localhost"));
20+
}

src/test/run-pass/spawn2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// -*- rust -*-
22

3-
fn main() { spawn child(10, 20, 30, 40, 50, 60, 70, 80, 90); }
3+
use std;
4+
import std::task::_spawn;
5+
6+
fn main() { _spawn(bind child(10, 20, 30, 40, 50, 60, 70, 80, 90)); }
47

58
fn child(i1: int, i2: int, i3: int, i4: int, i5: int, i6: int, i7: int,
69
i8: int, i9: int) {

0 commit comments

Comments
 (0)