]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/spawn2.rs
f9350746349b32c2b0dc9e2b20f89051da522530
[rust.git] / src / test / run-pass / spawn2.rs
1 // -*- rust -*-
2 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
3 // file at the top-level directory of this distribution and at
4 // http://rust-lang.org/COPYRIGHT.
5 //
6 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 // option. This file may not be copied, modified, or distributed
10 // except according to those terms.
11
12 pub fn main() { task::spawn(|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }
13
14 fn child(&&args: (int, int, int, int, int, int, int, int, int)) {
15     let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args;
16     error!(i1);
17     error!(i2);
18     error!(i3);
19     error!(i4);
20     error!(i5);
21     error!(i6);
22     error!(i7);
23     error!(i8);
24     error!(i9);
25     assert!((i1 == 10));
26     assert!((i2 == 20));
27     assert!((i3 == 30));
28     assert!((i4 == 40));
29     assert!((i5 == 50));
30     assert!((i6 == 60));
31     assert!((i7 == 70));
32     assert!((i8 == 80));
33     assert!((i9 == 90));
34 }
35
36 // Local Variables:
37 // mode: rust;
38 // fill-column: 78;
39 // indent-tabs-mode: nil
40 // c-basic-offset: 4
41 // buffer-file-coding-system: utf-8-unix
42 // End: