Test That! 0.5: A powerful test assertion library for Rust

โš“ Rust    ๐Ÿ“… 2026-06-28    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 1      

surdeus

Test That! lets you write test assertions which precisely specify your intent:

let vec = vec![5, 123, -4];
assert_that!(vec, each(gt(0)));

and get informative, meaningful diagnostics when the tests fail:

Value of: vec
Expected: only contains elements that is greater than 0
Actual: [5, 123, -4],
  whose element #2 is -4, which is less than or equal to 0

I've recently published this new crate as a fork of GoogleTest Rust, which I had spearheaded a few years ago while I was at Google. Test That! has a much improved developer experience compared with the original. See my blog post (linked below) for more details.

I'm really keen on getting feedback on this crate. Please give it a try and let me know your experiences!

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed