miniblog.
← Back to all posts
Wilfred Hughes
Jan 22, 2022 at 20:10
I do wish Rust had a `expect(life()).toEqual(42)` syntax for tests. `assert_eq!(life(), 42)` just gives "assertion failed: 41 == 42" and it's hard to see which was the expected value. This is particularly hard with larger values.