Enum test::TestType[][src]

pub enum TestType {
    UnitTest,
    IntegrationTest,
    DocTest,
    Unknown,
}
🔬 This is a nightly-only experimental API. (test)
Expand description

根据 rust 书 约定的测试类型。

Variants

UnitTest
🔬 This is a nightly-only experimental API. (test)

单元测试应位于 crate 的 src 文件夹中。

IntegrationTest
🔬 This is a nightly-only experimental API. (test)

集成样式的测试应该位于 crate 的 tests 文件夹中。

DocTest
🔬 This is a nightly-only experimental API. (test)

Doctests 是由 librustdoc 手动创建的,因此它是另一种类型的测试。

Unknown
🔬 This is a nightly-only experimental API. (test)

测试不遵循项目布局约定的源 (例如, 在直接调用 rustc --test 编译的原始 main.rs 中进行测试)。

Trait Implementations

返回值的副本。 Read more

source 执行复制分配。 Read more

使用给定的格式化程序格式化该值。 Read more

将该值输入给定的 HasherRead more

将这种类型的切片送入给定的 Hasher 中。 Read more

此方法测试 selfother 值是否相等,并由 == 使用。 Read more

此方法测试 !=

Auto Trait Implementations

Blanket Implementations

获取 selfTypeIdRead more

从拥有的值中一成不变地借用。 Read more

从拥有的值中借用。 Read more

执行转换。

执行转换。

获得所有权后的结果类型。

通常通过克隆从借用数据中创建拥有的数据。 Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

使用借来的数据来替换拥有的数据,通常是通过克隆。 Read more

发生转换错误时返回的类型。

执行转换。

发生转换错误时返回的类型。

执行转换。