Test assertions

Hi, I have mainly worked with Kotlin the last couple of years but are now testing out Rust. Is there any recommended/community adopted library that can give me fluent/easy to write/read assertions in my tests, something similar to Kotest?

See How to Write Tests - The Rust Programming Language

You want the assert! and assert_eq! macros.

Yes, I know about those, but they are very basic/primitive. I am looking for something like this fluent_asserter - Rust that are actively maintained and used by the Rust community

1 Like

Lib.rs keeps great lists of crates solving a certain problem, including testing your Rust code: Testing — list of Rust libraries/crates // Lib.rs. Maybe you'll find a crate you like in there?

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.