From 616f34e3c3068b0d39c969cb91695d3ea6e3a71c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 17 Nov 2022 15:35:36 -0700 Subject: [PATCH] rustdoc: update tests for enum variant margin tweak --- src/test/rustdoc-gui/enum-variants.goml | 5 +++++ src/test/rustdoc/issue-88600.rs | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/test/rustdoc-gui/enum-variants.goml diff --git a/src/test/rustdoc-gui/enum-variants.goml b/src/test/rustdoc-gui/enum-variants.goml new file mode 100644 index 00000000000..230abb236bd --- /dev/null +++ b/src/test/rustdoc-gui/enum-variants.goml @@ -0,0 +1,5 @@ +// Verifies that there is non-zero margin on variants and their docblocks. +goto: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html" + +assert-css: (".variants > .variant", {"margin": "0px 0px 12px"}) +assert-css: (".variants > .docblock", {"margin": "0px 0px 32px 24px"}) diff --git a/src/test/rustdoc/issue-88600.rs b/src/test/rustdoc/issue-88600.rs index fc63ed343bd..db0d102b741 100644 --- a/src/test/rustdoc/issue-88600.rs +++ b/src/test/rustdoc/issue-88600.rs @@ -8,22 +8,22 @@ // @has issue_88600/enum.FooEnum.html pub enum FooEnum { - // @has - '//*[@id="variant.HiddenTupleItem"]//code' 'HiddenTupleItem(_)' + // @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(_)' // @count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0 HiddenTupleItem(#[doc(hidden)] H), - // @has - '//*[@id="variant.MultipleHidden"]//code' 'MultipleHidden(_, _)' + // @has - '//*[@id="variant.MultipleHidden"]//h3' 'MultipleHidden(_, _)' // @count - '//*[@id="variant.MultipleHidden.field.0"]' 0 // @count - '//*[@id="variant.MultipleHidden.field.1"]' 0 MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H), - // @has - '//*[@id="variant.MixedHiddenFirst"]//code' 'MixedHiddenFirst(_, S)' + // @has - '//*[@id="variant.MixedHiddenFirst"]//h3' 'MixedHiddenFirst(_, S)' // @count - '//*[@id="variant.MixedHiddenFirst.field.0"]' 0 // @has - '//*[@id="variant.MixedHiddenFirst.field.1"]' '1: S' MixedHiddenFirst(#[doc(hidden)] H, /** dox */ S), - // @has - '//*[@id="variant.MixedHiddenLast"]//code' 'MixedHiddenLast(S, _)' + // @has - '//*[@id="variant.MixedHiddenLast"]//h3' 'MixedHiddenLast(S, _)' // @has - '//*[@id="variant.MixedHiddenLast.field.0"]' '0: S' // @count - '//*[@id="variant.MixedHiddenLast.field.1"]' 0 MixedHiddenLast(/** dox */ S, #[doc(hidden)] H), - // @has - '//*[@id="variant.HiddenStruct"]//code' 'HiddenStruct' + // @has - '//*[@id="variant.HiddenStruct"]//h3' 'HiddenStruct' // @count - '//*[@id="variant.HiddenStruct.field.h"]' 0 // @has - '//*[@id="variant.HiddenStruct.field.s"]' 's: S' HiddenStruct {