提交 459d677b 编写于 作者: G Guillaume Gomez

Add test for rustdoc cfg(test) feature

上级 8ed2292d
// compile-pass
// compile-flags:--test
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
/// this doctest will be ignored:
///
/// ```
/// assert!(false);
/// ```
#[cfg(not(test))]
pub struct Foo;
/// this doctest will be tested:
///
/// ```
/// assert!(true);
/// ```
#[cfg(test)]
pub struct Foo;
running 1 test
test $DIR/cfg-test.rs - Foo (line 15) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册