if you're working in Rust, I recommend that you learn how to work with
macro_rules. specifically, I recommend this because you can use macros to
build custom assertions that can remove a lot of boilerplate from your test
for example, if you have an iterator that produces some complicated enum or struct, you could write a macro that will:
- advance the iterator, failing if it doesn't have anything remaining
- match the structure of the contents, failing if it isn't the right variation for the position
- extract value for further assertions
in fact, I can show you that very scenario.