Crates.io | should-be |
lib.rs | should-be |
version | 0.1.0 |
source | src |
created_at | 2023-01-04 23:32:33.896663 |
updated_at | 2023-01-04 23:32:33.896663 |
description | Postfix assertions of equality |
homepage | |
repository | |
max_upload_size | |
id | 751208 |
size | 3,091 |
Postfix assertions of equality
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?"))