Skip to content

Commit 4a64c79

Browse files
Add test for enum variant value display
1 parent a576dfd commit 4a64c79

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/rustdoc/enum-variant-value.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test ensures that the variant value is displayed with underscores but without
2+
// a type name at the end.
3+
4+
#![crate_name = "foo"]
5+
6+
// @has 'foo/enum.B.html'
7+
// @has - '//*[@class="rust item-decl"]/code' 'A = 12,'
8+
// @has - '//*[@class="rust item-decl"]/code' 'C = 1_245,'
9+
// @matches - '//*[@id="variant.A"]/h3' '^A = 12$'
10+
// @matches - '//*[@id="variant.C"]/h3' '^C = 1_245$'
11+
pub enum B {
12+
A = 12,
13+
B,
14+
C = 1245,
15+
}

0 commit comments

Comments
 (0)