Add test for enum item tuple fields documentation

This commit is contained in:
Guillaume Gomez 2021-07-25 21:18:11 +02:00
parent 2b790944a0
commit fbf78e1f9c
3 changed files with 21 additions and 4 deletions

View file

@ -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,
},
}