|
| 1 | +// This test ensures that the where conditions are correctly displayed. |
| 2 | +goto: file://|DOC_PATH|/lib2/trait.Whitespace.html |
| 3 | +show-text: true |
| 4 | +// First, we check in the trait definition if the where clause is "on its own" (not on the same |
| 5 | +// line than "pub trait Whitespace<Idx>"). |
| 6 | +compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y")) |
| 7 | +// And that the code following it isn't on the same line either. |
| 8 | +compare-elements-position-false: (".item-decl .fnname", ".where.fmt-newline", ("y")) |
| 9 | + |
| 10 | +goto: file://|DOC_PATH|/lib2/struct.WhereWhitespace.html |
| 11 | +// We make the screen a bit wider to ensure that the trait impl is on one line. |
| 12 | +size: (915, 915) |
| 13 | + |
| 14 | +compare-elements-position-false: ("#method\.new .fnname", "#method\.new .where.fmt-newline", ("y")) |
| 15 | +// We ensure that both the trait name and the struct name are on the same line in |
| 16 | +// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>". |
| 17 | +compare-elements-position: ( |
| 18 | + "#trait-implementations-list .impl h3 .trait", |
| 19 | + "#trait-implementations-list .impl h3 .struct", |
| 20 | + ("y"), |
| 21 | +) |
| 22 | +// And we now check that the where condition isn't on the same line. |
| 23 | +compare-elements-position-false: ( |
| 24 | + "#trait-implementations-list .impl h3 .trait", |
| 25 | + "#trait-implementations-list .impl h3 .where.fmt-newline", |
| 26 | + ("y"), |
| 27 | +) |
0 commit comments