mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add pp test for interleaving comments through vectors. Closes #679
This commit is contained in:
parent
89df915a13
commit
2f61848b24
29
src/test/pretty/vec-comments.pp
Normal file
29
src/test/pretty/vec-comments.pp
Normal 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 */
|
||||
}
|
31
src/test/pretty/vec-comments.rs
Normal file
31
src/test/pretty/vec-comments.rs
Normal 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 */
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user