Enum test::TestType [−][src]
pub enum TestType { UnitTest, IntegrationTest, DocTest, Unknown, }
🔬 This is a nightly-only experimental API. (
test
)Expand description
根据 rust 书 约定的测试类型。
Variants
🔬 This is a nightly-only experimental API. (
test
)单元测试应位于 crate 的 src
文件夹中。
🔬 This is a nightly-only experimental API. (
test
)集成样式的测试应该位于 crate 的 tests
文件夹中。
🔬 This is a nightly-only experimental API. (
test
)Doctests 是由 librustdoc
手动创建的,因此它是另一种类型的测试。
🔬 This is a nightly-only experimental API. (
test
)测试不遵循项目布局约定的源 (例如,
在直接调用 rustc --test
编译的原始 main.rs
中进行测试)。