f96a2a2ca1
and test cases. Closes #3513
17 lines
259 B
Rust
17 lines
259 B
Rust
|
|
|
|
// -*- rust -*-
|
|
extern mod std;
|
|
|
|
fn grow(v: &mut ~[int]) { *v += ~[1]; }
|
|
|
|
fn main() {
|
|
let mut v: ~[int] = ~[];
|
|
grow(&mut v);
|
|
grow(&mut v);
|
|
grow(&mut v);
|
|
let len = vec::len::<int>(v);
|
|
log(debug, len);
|
|
assert (len == 3 as uint);
|
|
}
|