-
Notifications
You must be signed in to change notification settings - Fork 13k
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
da6d82e
commit bd81949
Showing
3 changed files
with
30 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,16 @@ | ||
// The goal of this test is to check that the external trait implementors, generated with JS, | ||
// have the same display than the "local" ones. | ||
goto: file://|DOC_PATH|/implementors/trait.Whatever.html | ||
assert: "#implementors-list" | ||
// There are supposed to be two implementors listed. | ||
assert-count: ("#implementors-list > .impl", 2) | ||
// Now we check that both implementors have an anchor, an ID and a similar DOM. | ||
assert: ("#implementors-list > .impl:nth-child(1) > a.anchor") | ||
assert-attribute: ("#implementors-list > .impl:nth-child(1)", {"id": "impl-Whatever"}) | ||
assert-attribute: ("#implementors-list > .impl:nth-child(1) > a.anchor", {"href": "#impl-Whatever"}) | ||
assert: "#implementors-list > .impl:nth-child(1) > code.in-band" | ||
|
||
assert: ("#implementors-list > .impl:nth-child(2) > a.anchor") | ||
assert-attribute: ("#implementors-list > .impl:nth-child(2)", {"id": "impl-Whatever-1"}) | ||
assert-attribute: ("#implementors-list > .impl:nth-child(2) > a.anchor", {"href": "#impl-Whatever-1"}) | ||
assert: "#implementors-list > .impl:nth-child(2) > code.in-band" |
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,7 @@ | ||
[package] | ||
name = "implementors" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
path = "lib.rs" |
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,7 @@ | ||
pub trait Whatever { | ||
fn method() {} | ||
} | ||
|
||
pub struct Struct; | ||
|
||
impl Whatever for Struct {} |