Skip to content

Commit 616f34e

Browse files
committed
rustdoc: update tests for enum variant margin tweak
1 parent 4525eb1 commit 616f34e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Verifies that there is non-zero margin on variants and their docblocks.
2+
goto: "file://" + |DOC_PATH| + "/test_docs/enum.WhoLetTheDogOut.html"
3+
4+
assert-css: (".variants > .variant", {"margin": "0px 0px 12px"})
5+
assert-css: (".variants > .docblock", {"margin": "0px 0px 32px 24px"})

src/test/rustdoc/issue-88600.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ pub struct S;
88

99
// @has issue_88600/enum.FooEnum.html
1010
pub enum FooEnum {
11-
// @has - '//*[@id="variant.HiddenTupleItem"]//code' 'HiddenTupleItem(_)'
11+
// @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(_)'
1212
// @count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0
1313
HiddenTupleItem(#[doc(hidden)] H),
14-
// @has - '//*[@id="variant.MultipleHidden"]//code' 'MultipleHidden(_, _)'
14+
// @has - '//*[@id="variant.MultipleHidden"]//h3' 'MultipleHidden(_, _)'
1515
// @count - '//*[@id="variant.MultipleHidden.field.0"]' 0
1616
// @count - '//*[@id="variant.MultipleHidden.field.1"]' 0
1717
MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H),
18-
// @has - '//*[@id="variant.MixedHiddenFirst"]//code' 'MixedHiddenFirst(_, S)'
18+
// @has - '//*[@id="variant.MixedHiddenFirst"]//h3' 'MixedHiddenFirst(_, S)'
1919
// @count - '//*[@id="variant.MixedHiddenFirst.field.0"]' 0
2020
// @has - '//*[@id="variant.MixedHiddenFirst.field.1"]' '1: S'
2121
MixedHiddenFirst(#[doc(hidden)] H, /** dox */ S),
22-
// @has - '//*[@id="variant.MixedHiddenLast"]//code' 'MixedHiddenLast(S, _)'
22+
// @has - '//*[@id="variant.MixedHiddenLast"]//h3' 'MixedHiddenLast(S, _)'
2323
// @has - '//*[@id="variant.MixedHiddenLast.field.0"]' '0: S'
2424
// @count - '//*[@id="variant.MixedHiddenLast.field.1"]' 0
2525
MixedHiddenLast(/** dox */ S, #[doc(hidden)] H),
26-
// @has - '//*[@id="variant.HiddenStruct"]//code' 'HiddenStruct'
26+
// @has - '//*[@id="variant.HiddenStruct"]//h3' 'HiddenStruct'
2727
// @count - '//*[@id="variant.HiddenStruct.field.h"]' 0
2828
// @has - '//*[@id="variant.HiddenStruct.field.s"]' 's: S'
2929
HiddenStruct {

0 commit comments

Comments
 (0)