File tree 3 files changed +31
-1
lines changed
3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ goto: file://|DOC_PATH|/lib2/struct.Foo.html
2
+ // This test checks that the font weight is correctly applied.
3
+ assert: ("//*[@class='docblock type-decl']//a[text()='Alias']", {"font-weight": "400"})
4
+ assert: ("//*[@class='structfield small-section-header']//a[text()='Alias']", {"font-weight": "400"})
5
+ assert: ("#method\.a_method > code", {"font-weight": "600"})
6
+ assert: ("#associatedtype\.X > code", {"font-weight": "600"})
7
+ assert: ("#associatedconstant\.Y > code", {"font-weight": "600"})
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ assert: (".sidebar > .location", "Crate lib2")
31
31
assert: (".sidebar-elems > .crate > ul > li > a.current", "lib2")
32
32
// We now go to the "foobar" function page.
33
33
assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
34
- assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Functions")
34
+ assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
35
+ assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits")
36
+ assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions")
37
+ assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions")
35
38
assert: ("#functions + table td > a", "foobar")
36
39
click: "#functions + table td > a"
37
40
Original file line number Diff line number Diff line change @@ -9,3 +9,23 @@ pub mod module {
9
9
}
10
10
11
11
pub fn foobar ( ) { }
12
+
13
+ pub type Alias = u32 ;
14
+
15
+ pub struct Foo {
16
+ pub x : Alias ,
17
+ }
18
+
19
+ impl Foo {
20
+ pub fn a_method ( & self ) { }
21
+ }
22
+
23
+ pub trait Trait {
24
+ type X ;
25
+ const Y : u32 ;
26
+ }
27
+
28
+ impl Trait for Foo {
29
+ type X = u32 ;
30
+ const Y : u32 = 0 ;
31
+ }
You can’t perform that action at this time.
0 commit comments