Add pp test for interleaving comments through vectors. Closes #679

This commit is contained in:
Brian Anderson 2011-08-16 11:37:35 -07:00
parent 89df915a13
commit 2f61848b24
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,29 @@
// Issue #679
// Testing that comments are correctly interleaved
// pp-exact:vec-comments.pp
fn main() {
let v1 =
~[
// Comment
0,
// Comment
1,
// Comment
2];
let v2 =
~[0, // Comment
1, // Comment
2]; // Comment
let v3 =
~[
/* Comment */
0,
/* Comment */
1,
/* Comment */
2];
let v4 =
~[0, /* Comment */
1, /* Comment */
2]; /* Comment */
}

View File

@ -0,0 +1,31 @@
// Issue #679
// Testing that comments are correctly interleaved
// pp-exact:vec-comments.pp
fn main() {
let v1 = ~[
// Comment
0,
// Comment
1,
// Comment
2
];
let v2 = ~[
0, // Comment
1, // Comment
2 // Comment
];
let v3 = ~[
/* Comment */
0,
/* Comment */
1,
/* Comment */
2
];
let v4 = ~[
0, /* Comment */
1, /* Comment */
2 /* Comment */
];
}