PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/src/test/run-pass/vec-concat.rs

http://github.com/jruderman/rust
Rust | 10 lines | 9 code | 0 blank | 1 comment | 3 complexity | 94bd3f1458ec2aaf187b23c337341cee MD5 | raw file
 1// -*- rust -*-
 2fn main() {
 3    let a: ~[int] = ~[1, 2, 3, 4, 5];
 4    let b: ~[int] = ~[6, 7, 8, 9, 0];
 5    let v: ~[int] = a + b;
 6    log(debug, v[9]);
 7    assert (v[0] == 1);
 8    assert (v[7] == 8);
 9    assert (v[9] == 0);
10}