I wish that the #rustlang assert_eq!() macro had a convention for whether the expected value should be first or second. I always have to go puzzle through the source code to figure out which argument was the wrong one.
=> More informations about this toot | More toots from blp@framapiaf.org
@blp Yeah, I always think that when I use it, then realise that under some usage scenarios there is no expected result, just two different values from two separate sources. So I see why they've left it flexible, but it can be a pain.
=> More informations about this toot | More toots from bobulous@fosstodon.org
@blp Its annoying when making fancier asserts, like snapbox::assert_data_eq
which shows a diff because we have to be prescriptive about it.
=> More informations about this toot | More toots from epage@hachyderm.io
@blp
I normally use actual/expected order in assertions.
I wish someone could tell me how that grew on me. Maybe from my Java times?
Anyway, the fact that there is no convention is a nice example of minimal design.
=> More informations about this toot | More toots from KingmaYpe@mastodon.green This content has been proxied by September (ba2dc).Proxy Information
text/gemini