Xpct — An extensible, batteries-included assertions library for Rust

Apologies if this isn't the right place to share this!

Hi! :wave:

After looking for an assertions library for a different project, I decided to write my own! It's inspired by Gomega, an assertions library for Go.

I put a big emphasis on useful, well-formatted output and making it easy to write your own matchers without having to reimplement any formatting logic.

I also designed it to be batteries-included, with a lot of matchers included out of the box.

I would love feedback on the API design, if y'all have any to share!

Thanks!

2 Likes

The only thing I find weird in the API design is that the any combinator changes the behavior of chained .to(...).to(...) calls from conjunction to disjunction. I think the any case should differ syntactically, because in every other context, chaining of matchers implies conjunction.

Yeah, good point. any is a bit of a special case. Thanks for the feedback!

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.