summary refs log tree commit diff
path: root/src/test/run-pass/spawn2.rs
blob: f9350746349b32c2b0dc9e2b20f89051da522530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub fn main() { task::spawn(|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }

fn child(&&args: (int, int, int, int, int, int, int, int, int)) {
    let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args;
    error!(i1);
    error!(i2);
    error!(i3);
    error!(i4);
    error!(i5);
    error!(i6);
    error!(i7);
    error!(i8);
    error!(i9);
    assert!((i1 == 10));
    assert!((i2 == 20));
    assert!((i3 == 30));
    assert!((i4 == 40));
    assert!((i5 == 50));
    assert!((i6 == 60));
    assert!((i7 == 70));
    assert!((i8 == 80));
    assert!((i9 == 90));
}

// Local Variables:
// mode: rust;
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// End: