1
Fork 0

add tests for rustdoc output-format json

This commit is contained in:
Guillaume Gomez 2019-11-16 16:23:27 +01:00
parent 10492c392a
commit 15babed8b7
3 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,27 @@
// build-pass
// compile-flags:-Z unstable-options --show-coverage
pub mod foo {
/// Hello!
pub struct Foo;
/// Bar
pub enum Bar { A }
}
/// X
pub struct X;
/// Bar
pub mod bar {
/// bar
pub struct Bar;
/// X
pub enum X { Y }
}
/// yolo
pub enum Yolo { X }
pub struct Xo<T: Clone> {
x: T,
}

View file

@ -0,0 +1,7 @@
+-------------------------------------+------------+------------+------------+
| File | Documented | Total | Percentage |
+-------------------------------------+------------+------------+------------+
| ...test/rustdoc-ui/coverage/json.rs | 7 | 13 | 53.8% |
+-------------------------------------+------------+------------+------------+
| Total | 7 | 13 | 53.8% |
+-------------------------------------+------------+------------+------------+

View file

@ -0,0 +1,5 @@
// compile-flags:-Z unstable-options --output-format
// should-fail
/// toudoum!
pub struct SomeStruct;