File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test checks that fields are displayed as expected (one by line).
2+ go-to: "file://" + |DOC_PATH| + "/test_docs/fields/struct.Struct.html"
3+ store-position: ("#structfield\.a", {"y": a_y})
4+ store-position: ("#structfield\.b", {"y": b_y})
5+ assert: |a_y| < |b_y|
6+
7+ go-to: "file://" + |DOC_PATH| + "/test_docs/fields/union.Union.html"
8+ store-position: ("#structfield\.a", {"y": a_y})
9+ store-position: ("#structfield\.b", {"y": b_y})
10+ assert: |a_y| < |b_y|
11+
12+ go-to: "file://" + |DOC_PATH| + "/test_docs/fields/enum.Enum.html"
13+ store-position: ("#variant\.A\.field\.a", {"y": a_y})
14+ store-position: ("#variant\.A\.field\.b", {"y": b_y})
15+ assert: |a_y| < |b_y|
16+ store-position: ("#variant\.B\.field\.a", {"y": a_y})
17+ store-position: ("#variant\.B\.field\.b", {"y": b_y})
18+ assert: |a_y| < |b_y|
Original file line number Diff line number Diff line change @@ -486,3 +486,24 @@ pub mod search_results {
486486 }
487487
488488}
489+
490+ pub mod fields {
491+ pub struct Struct {
492+ pub a : u8 ,
493+ pub b : u32 ,
494+ }
495+ pub union Union {
496+ pub a : u8 ,
497+ pub b : u32 ,
498+ }
499+ pub enum Enum {
500+ A {
501+ a : u8 ,
502+ b : u32 ,
503+ } ,
504+ B {
505+ a : u8 ,
506+ b : u32 ,
507+ } ,
508+ }
509+ }
Original file line number Diff line number Diff line change 1+ #![ crate_name = "foo" ]
2+
3+ // @has 'foo/union.Union.html'
4+ // Checking that there is a whitespace after `:`.
5+ // @has - '//*[@id="structfield.a"]/code' 'a: u8'
6+ // @has - '//*[@id="structfield.b"]/code' 'b: u32'
7+ pub union Union {
8+ pub a : u8 ,
9+ /// tadam
10+ pub b : u32 ,
11+ }
You can’t perform that action at this time.
0 commit comments