1 个不稳定版本

0.1.0 2023 年 1 月 4 日

#10#通过

MIT/Apache

4KB
52

should-be

后缀等式断言

use should_be::ShouldBe; // Import the trait
let yaks_shaved = 0;
yaks_shaved.should_be(0); // passes
yaks_shaved.should_be(1); // panics
// you can provide a panic message using a tuple.
yaks_shaved.should_be((1, "why haven't you shaved?"))

lib.rs:

后缀等式断言

use should_be::ShouldBe; // Import the trait
let yaks_shaved = 0;
yaks_shaved.should_be(0); // passes
yaks_shaved.should_be(1); // panics
// you can provide a panic message using a tuple.
yaks_shaved.should_be((1, "why haven't you shaved?"))

无运行时依赖