Add test for enum item tuple fields documentation
This commit is contained in:
parent
2b790944a0
commit
fbf78e1f9c
@ -1,7 +1,7 @@
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| File | Documented | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 75.0% | 0 | 0.0% |
|
||||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 66.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| Total | 6 | 75.0% | 0 | 0.0% |
|
||||
| Total | 6 | 66.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
|
@ -81,8 +81,8 @@ pub enum EnumStructVariant {
|
||||
}
|
||||
|
||||
// @has 'toggle_item_contents/enum.LargeEnum.html'
|
||||
// @count - '//details[@class="rustdoc-toggle type-contents-toggle"]' 1
|
||||
// @has - '//details[@class="rustdoc-toggle type-contents-toggle"]' 'Show 13 variants'
|
||||
// @count - '//*[@class="rust enum"]//details[@class="rustdoc-toggle type-contents-toggle"]' 1
|
||||
// @has - '//*[@class="rust enum"]//details[@class="rustdoc-toggle type-contents-toggle"]' 'Show 13 variants'
|
||||
pub enum LargeEnum {
|
||||
A, B, C, D, E, F(u8), G, H, I, J, K, L, M
|
||||
}
|
||||
|
@ -17,3 +17,20 @@ pub struct Foo(
|
||||
/// not hello
|
||||
pub i8,
|
||||
);
|
||||
|
||||
// @has foo/enum.Bar.html
|
||||
// @has - '//pre[@class="rust enum"]' 'BarVariant(String),'
|
||||
// @matches - '//*[@id="variant.BarVariant.fields"]/h3' '^Tuple Fields of BarVariant$'
|
||||
// @has - '//*[@id="variant.BarVariant.field.0"]' '0: String'
|
||||
// @has - '//*[@id="variant.BarVariant.fields"]//*[@class="docblock"]' 'Hello docs'
|
||||
// @matches - '//*[@id="variant.FooVariant.fields"]/h3' '^Fields of FooVariant$'
|
||||
pub enum Bar {
|
||||
BarVariant(
|
||||
/// Hello docs
|
||||
String
|
||||
),
|
||||
FooVariant {
|
||||
/// hello
|
||||
x: u32,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user