I always wondered what exactly is the meaning of actual and expected in
public static void assertEquals(... actual, ... expected)
actual - the actual value
expected - the expected value
Most testing frameworks (the xUnit family) are based on the JUnit framework. The
Assert family of functions in JUnit have the
(expected, actual) format; it became a convention, and most of the other frameworks followed that convention.
Some frameworks (like TestNG or NUnit 2.4+ for .NET) reversed that order (with the use of a constraint-based model for NUnit) to increase readability ("make sure that the actual value is 56" feels more natural than "make sure that 56 is the actual value").
The bottom line is: stick to the convention of your framework. If you use JUnit, put the expected value first. If you use TestNG, put the actual value first. You're right, that makes no difference in the test results when you accidentally reverse the arguments. But it makes a big difference in the default message you get from a failing test. When your reversed
assertEquals(ShouldBeTrueButReturnsFalse(), true) in JUnit fails, the default message says "expected [false] but found [true]", where it should have said "expected [true] but found [false]". This is confusing, to say the least, and you shouldn't have to deal with a possible misdirection of that message.
Some of the unit tests in the Github link you provide don't follow the convention and have the same problem. Don't do that. Stick to the convention of your framework.