Skip to content

Commit

Permalink
Add test that variant contains its fields
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed May 17, 2022
1 parent c921d75 commit 45e05ec
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/test/rustdoc-json/enums/variant_tuple_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
// @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),
VariantA(
// @set field_0 = - "$.index[*][?(@.name=='0')].id"
// @has - "$.index[*][?(@.name=='0')].kind" \"struct_field\"
u32,
// @set field_1 = - "$.index[*][?(@.name=='1')].id"
// @has - "$.index[*][?(@.name=='1')].kind" \"struct_field\"
String,
),
}

// @has - "$.index[*][?(@.name=='VariantA')].inner.variant_inner[*]" $field_0
// @has - "$.index[*][?(@.name=='VariantA')].inner.variant_inner[*]" $field_1

0 comments on commit 45e05ec

Please sign in to comment.