src/test/rustdoc-json: Check for struct_fields in variant_tuple_struct.rs

The presence of `struct_field`s is being checked for already in
`variant_struct.rs`. We should also check for them in `variant_tuple_struct.rs`.
This commit is contained in:
Martin Nordholts 2022-01-19 22:03:08 +01:00
parent 5e57faa78a
commit ab239cc749
2 changed files with 4 additions and 2 deletions

View File

@ -2,8 +2,8 @@
// @has - "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"
pub enum EnumStruct {
// @has - "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\"
// @has - "$.index[*][?(@.name=='x')]"
// @has - "$.index[*][?(@.name=='y')]"
// @has - "$.index[*][?(@.name=='x')].kind" \"struct_field\"
// @has - "$.index[*][?(@.name=='y')].kind" \"struct_field\"
VariantS {
x: u32,
y: String,

View File

@ -2,5 +2,7 @@
// @has - "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\"
pub enum EnumTupleStruct {
// @has - "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\"
// @has - "$.index[*][?(@.name=='0')].kind" \"struct_field\"
// @has - "$.index[*][?(@.name=='1')].kind" \"struct_field\"
VariantA(u32, String),
}