Change error message of a failing `assert_eq!`
mathstuf:
I tend to do
actual, expectedbecauseactualis usually just a variable reference whileexpectedcan be a large literal or other more verbose expression and the last argument is far more amenable to reformat splay than the former (IMO).
jUnit and related use the opposite order for a similar reason: they're assuming that expected is often a small literal, and actual is often a function call with a bunch of parameters (the call that's being tested). This is also the documented convention used in googletest for other languages, though apparently not the Rust port as mentioned above?
I've rarely seen any test framework for any language which documents the order as actual, expected - most either don't assign a specific meaning or use expected, actual.
Discussion in the ATmosphere