Update rustdoc-ui tests
This commit is contained in:
parent
d9d84dca8e
commit
f957bae74e
10 changed files with 85 additions and 51 deletions
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 7 | 14 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/basic.rs | 7 | 14 | 50.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 7 | 14 | 50.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
27
src/test/rustdoc-ui/coverage/doc-examples.rs
Normal file
27
src/test/rustdoc-ui/coverage/doc-examples.rs
Normal file
|
@ -0,0 +1,27 @@
|
|||
// compile-flags:-Z unstable-options --show-coverage
|
||||
// check-pass
|
||||
|
||||
//! This test ensure that only rust code examples are counted.
|
||||
|
||||
/// Doc
|
||||
///
|
||||
/// ```
|
||||
/// let x = 2;
|
||||
/// ```
|
||||
pub struct Foo;
|
||||
|
||||
/// Doc
|
||||
///
|
||||
/// ```text
|
||||
/// yolo
|
||||
/// ```
|
||||
pub trait Bar {}
|
||||
|
||||
/// Doc
|
||||
///
|
||||
/// ```ignore (just for the sake of this test)
|
||||
/// let x = 2;
|
||||
/// ```
|
||||
pub fn foo<T: Bar, D: ::std::fmt::Debug>(a: Foo, b: u32, c: T, d: D) -> u32 {
|
||||
0
|
||||
}
|
7
src/test/rustdoc-ui/coverage/doc-examples.stdout
Normal file
7
src/test/rustdoc-ui/coverage/doc-examples.stdout
Normal file
|
@ -0,0 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...tdoc-ui/coverage/doc-examples.rs | 4 | 4 | 100.0% | 2 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 4 | 4 | 100.0% | 2 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 0 | 1 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/empty.rs | 0 | 1 | 0.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 0 | 1 | 0.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 6 | 8 | 75.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...est/rustdoc-ui/coverage/enums.rs | 6 | 8 | 75.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 6 | 8 | 75.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% |
|
||||
| <anon> | 2 | 2 | 100.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 3 | 3 | 100.0% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...st/rustdoc-ui/coverage/exotic.rs | 1 | 1 | 100.0% | 0 | 0.0% |
|
||||
| <anon> | 2 | 2 | 100.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 3 | 3 | 100.0% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"$DIR/json.rs":{"total":13,"with_docs":7}}
|
||||
{"$DIR/json.rs":{"total":13,"with_docs":7,"with_examples":0}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 4 | 7 | 57.1% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...t/rustdoc-ui/coverage/private.rs | 4 | 7 | 57.1% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 4 | 7 | 57.1% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 6 | 7 | 85.7% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...oc-ui/coverage/statics-consts.rs | 6 | 7 | 85.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 6 | 7 | 85.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+-------------------------------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
| Total | 6 | 7 | 85.7% |
|
||||
+-------------------------------------+------------+------------+------------+
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| File | Documented | Total | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| ...st/rustdoc-ui/coverage/traits.rs | 6 | 7 | 85.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
| Total | 6 | 7 | 85.7% | 0 | 0.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue