#单元测试 #工具包 #断言 #用例 #可读性

describe

编写可读、易用的单元测试的测试工具包

1 个不稳定版本

0.1.0 2023年1月11日

#584测试

MIT 许可证

9KB
141

describe

Describe 是一个编写可读、易用的单元测试的测试工具包。

入门

Describe 提供一个用于创建新测试用例的函数,assert_that

use describe::assert_that;

// An example function to test.
fn get_answer_to_life() -> u8 {
    42
}

...

// Assert that the answer to life is 42.
assert_that(&get_answer_to_life()).is(&42);

无运行时依赖