|
1 | 1 | // This test ensures that the variant value is displayed with underscores but without
|
2 | 2 | // a type name at the end.
|
3 | 3 |
|
| 4 | +// aux-build:enum-variant.rs |
| 5 | + |
4 | 6 | #![crate_name = "foo"]
|
5 | 7 |
|
| 8 | +extern crate bar; |
| 9 | + |
6 | 10 | // In this case, since all variants are C-like variants and at least one of them
|
7 | 11 | // has its value set, we display values for all of them.
|
8 | 12 |
|
@@ -60,3 +64,35 @@ pub enum D {
|
60 | 64 | A,
|
61 | 65 | C(u32),
|
62 | 66 | }
|
| 67 | + |
| 68 | +// @has 'foo/enum.E.html' |
| 69 | +// @has - '//*[@class="rust item-decl"]/code' 'A = 12,' |
| 70 | +// @has - '//*[@class="rust item-decl"]/code' 'B = 13,' |
| 71 | +// @has - '//*[@class="rust item-decl"]/code' 'C = 1_245,' |
| 72 | +// @matches - '//*[@id="variant.A"]/h3' '^A = 12$' |
| 73 | +// @matches - '//*[@id="variant.B"]/h3' '^B = 13$' |
| 74 | +// @matches - '//*[@id="variant.C"]/h3' '^C = 1_245$' |
| 75 | +pub use bar::E; |
| 76 | + |
| 77 | +// @has 'foo/enum.F.html' |
| 78 | +// @has - '//*[@class="rust item-decl"]/code' 'A,' |
| 79 | +// @has - '//*[@class="rust item-decl"]/code' 'B,' |
| 80 | +// @matches - '//*[@id="variant.A"]/h3' '^A$' |
| 81 | +// @matches - '//*[@id="variant.B"]/h3' '^B$' |
| 82 | +pub use bar::F; |
| 83 | + |
| 84 | +// @has 'foo/enum.G.html' |
| 85 | +// @has - '//*[@class="rust item-decl"]/code' 'A = 12,' |
| 86 | +// @has - '//*[@class="rust item-decl"]/code' 'B,' |
| 87 | +// @has - '//*[@class="rust item-decl"]/code' 'C(u32),' |
| 88 | +// @matches - '//*[@id="variant.A"]/h3' '^A = 12$' |
| 89 | +// @matches - '//*[@id="variant.B"]/h3' '^B$' |
| 90 | +// @has - '//*[@id="variant.C"]/h3' 'C(u32)' |
| 91 | +pub use bar::G; |
| 92 | + |
| 93 | +// @has 'foo/enum.H.html' |
| 94 | +// @has - '//*[@class="rust item-decl"]/code' 'A,' |
| 95 | +// @has - '//*[@class="rust item-decl"]/code' 'C(u32),' |
| 96 | +// @matches - '//*[@id="variant.A"]/h3' '^A$' |
| 97 | +// @has - '//*[@id="variant.C"]/h3' 'C(u32)' |
| 98 | +pub use bar::H; |
0 commit comments