Skip to content

Commit f957bae

Browse files
committedAug 18, 2020
Update rustdoc-ui tests
1 parent d9d84dc commit f957bae

10 files changed

+85
-51
lines changed
 
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 7 | 14 | 50.0% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 7 | 14 | 50.0% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// compile-flags:-Z unstable-options --show-coverage
2+
// check-pass
3+
4+
//! This test ensure that only rust code examples are counted.
5+
6+
/// Doc
7+
///
8+
/// ```
9+
/// let x = 2;
10+
/// ```
11+
pub struct Foo;
12+
13+
/// Doc
14+
///
15+
/// ```text
16+
/// yolo
17+
/// ```
18+
pub trait Bar {}
19+
20+
/// Doc
21+
///
22+
/// ```ignore (just for the sake of this test)
23+
/// let x = 2;
24+
/// ```
25+
pub fn foo<T: Bar, D: ::std::fmt::Debug>(a: Foo, b: u32, c: T, d: D) -> u32 {
26+
0
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...tdoc-ui/coverage/doc-examples.rs | 4 | 4 | 100.0% | 2 | 50.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 4 | 4 | 100.0% | 2 | 50.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 0 | 1 | 0.0% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 0 | 1 | 0.0% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 6 | 8 | 75.0% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 6 | 8 | 75.0% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% |
5-
| <anon> | 2 | 2 | 100.0% |
6-
+-------------------------------------+------------+------------+------------+
7-
| Total | 3 | 3 | 100.0% |
8-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% | 0 | 0.0% |
5+
| <anon> | 2 | 2 | 100.0% | 0 | 0.0% |
6+
+-------------------------------------+------------+------------+------------+------------+------------+
7+
| Total | 3 | 3 | 100.0% | 0 | 0.0% |
8+
+-------------------------------------+------------+------------+------------+------------+------------+
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"$DIR/json.rs":{"total":13,"with_docs":7}}
1+
{"$DIR/json.rs":{"total":13,"with_docs":7,"with_examples":0}}
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 4 | 7 | 57.1% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 4 | 7 | 57.1% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 6 | 7 | 85.7% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 6 | 7 | 85.7% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
+-------------------------------------+------------+------------+------------+
2-
| File | Documented | Total | Percentage |
3-
+-------------------------------------+------------+------------+------------+
4-
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% |
5-
+-------------------------------------+------------+------------+------------+
6-
| Total | 6 | 7 | 85.7% |
7-
+-------------------------------------+------------+------------+------------+
1+
+-------------------------------------+------------+------------+------------+------------+------------+
2+
| File | Documented | Total | Percentage | Examples | Percentage |
3+
+-------------------------------------+------------+------------+------------+------------+------------+
4+
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% | 0 | 0.0% |
5+
+-------------------------------------+------------+------------+------------+------------+------------+
6+
| Total | 6 | 7 | 85.7% | 0 | 0.0% |
7+
+-------------------------------------+------------+------------+------------+------------+------------+

0 commit comments

Comments
 (0)
Please sign in to comment.