rustdoc: add gui test for no-docblock margins
This commit is contained in:
parent
f145f283f7
commit
1dcbe72031
8
src/test/rustdoc-gui/no-docblock.goml
Normal file
8
src/test/rustdoc-gui/no-docblock.goml
Normal file
@ -0,0 +1,8 @@
|
||||
// This test checks that there are margins applied to methods with no docblocks.
|
||||
goto: file://|DOC_PATH|/test_docs/trait.TraitWithNoDocblocks.html
|
||||
// Check that the two methods are more than 24px apart.
|
||||
compare-elements-position-near-false: ("//*[@id='tymethod.first_fn']", "//*[@id='tymethod.second_fn']", {"y": 24})
|
||||
|
||||
goto: file://|DOC_PATH|/test_docs/struct.TypeWithNoDocblocks.html
|
||||
// Check that the two methods are more than 24px apart.
|
||||
compare-elements-position-near-false: ("//*[@id='method.first_fn']", "//*[@id='method.second_fn']", {"y": 24})
|
@ -355,3 +355,15 @@ impl<R: std::io::Read> std::iter::Iterator for NotableStructWithLongName<R> {
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> { () }
|
||||
}
|
||||
|
||||
pub trait TraitWithNoDocblocks {
|
||||
fn first_fn(&self);
|
||||
fn second_fn(&self);
|
||||
}
|
||||
|
||||
pub struct TypeWithNoDocblocks;
|
||||
|
||||
impl TypeWithNoDocblocks {
|
||||
pub fn first_fn(&self) {}
|
||||
pub fn second_fn(&self) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user