mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Add UI regressions tests for rustdoc --show-coverage
option
This commit is contained in:
parent
e9161db5b5
commit
0eff07ee4e
13
tests/rustdoc-ui/show-coverage-json.rs
Normal file
13
tests/rustdoc-ui/show-coverage-json.rs
Normal file
@ -0,0 +1,13 @@
|
||||
//@ compile-flags: -Z unstable-options --show-coverage --output-format=json
|
||||
//@ check-pass
|
||||
|
||||
mod bar {
|
||||
/// a
|
||||
///
|
||||
/// ```
|
||||
/// let x = 0;
|
||||
/// ```
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
pub use bar::Foo;
|
1
tests/rustdoc-ui/show-coverage-json.stdout
Normal file
1
tests/rustdoc-ui/show-coverage-json.stdout
Normal file
@ -0,0 +1 @@
|
||||
{"$DIR/show-coverage-json.rs":{"total":2,"with_docs":1,"total_examples":2,"with_examples":1}}
|
13
tests/rustdoc-ui/show-coverage.rs
Normal file
13
tests/rustdoc-ui/show-coverage.rs
Normal file
@ -0,0 +1,13 @@
|
||||
//@ compile-flags: -Z unstable-options --show-coverage
|
||||
//@ check-pass
|
||||
|
||||
mod bar {
|
||||
/// a
|
||||
///
|
||||
/// ```
|
||||
/// let x = 0;
|
||||
/// ```
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
pub use bar::Foo;
|
7
tests/rustdoc-ui/show-coverage.stdout
Normal file
7
tests/rustdoc-ui/show-coverage.stdout
Normal file
@ -0,0 +1,7 @@
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| File | Documented | Percentage | Examples | Percentage |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| ...ests/rustdoc-ui/show-coverage.rs | 1 | 50.0% | 1 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
||||
| Total | 1 | 50.0% | 1 | 50.0% |
|
||||
+-------------------------------------+------------+------------+------------+------------+
|
Loading…
Reference in New Issue
Block a user