Add a test written by jdm that tests repeated vector self appending.
This commit is contained in:
parent
8ad7f3b56b
commit
ec80918865
1 changed files with 12 additions and 0 deletions
12
src/test/run-pass/vec-self-append.rs
Normal file
12
src/test/run-pass/vec-self-append.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// xfail-stage0
|
||||
|
||||
fn main()
|
||||
{
|
||||
// Make sure we properly handle repeated self-appends.
|
||||
let vec[int] a = [0];
|
||||
auto i = 20;
|
||||
while (i > 0) {
|
||||
a += a;
|
||||
i -= 1;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue