forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4304d1d
commit b112bfe
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This test ensures that the where conditions are correctly displayed. | ||
goto: file://|DOC_PATH|/lib2/trait.Whitespace.html | ||
show-text: true | ||
// First, we check in the trait definition if the where clause is "on its own" (not on the same | ||
// line than "pub trait Whitespace<Idx>"). | ||
compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y")) | ||
// And that the code following it isn't on the same line either. | ||
compare-elements-position-false: (".item-decl .fnname", ".where.fmt-newline", ("y")) | ||
|
||
goto: file://|DOC_PATH|/lib2/struct.WhereWhitespace.html | ||
// We make the screen a bit wider to ensure that the trait impl is on one line. | ||
size: (915, 915) | ||
|
||
compare-elements-position-false: ("#method\.new .fnname", "#method\.new .where.fmt-newline", ("y")) | ||
// We ensure that both the trait name and the struct name are on the same line in | ||
// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>". | ||
compare-elements-position: ( | ||
"#trait-implementations-list .impl h3 .trait", | ||
"#trait-implementations-list .impl h3 .struct", | ||
("y"), | ||
) | ||
// And we now check that the where condition isn't on the same line. | ||
compare-elements-position-false: ( | ||
"#trait-implementations-list .impl h3 .trait", | ||
"#trait-implementations-list .impl h3 .where.fmt-newline", | ||
("y"), | ||
) |