For _GE/GT/LE/LT, things should just be written "naturally", i.e. "x > 3" -> DCHECK_GT(x, 3), because doing the reverse makes things too hard to understand. [CITATION NEEDED]
I just had the opposite experience. I knew about the order of EXPECTED, ACTUAL, and was originally doing an equality comparison, verifying that some value was equal to a constant and had this check:
EXPECT_EQ(3, value);
Then I realized that it wasn't that the value needed to be equal to the constant, it needed to be less than or equal, so I just changed the EQ to LE and wound up with:
EXPECT_LE(3, value);
Then a huge mystery developed while I tried to figure out why things were failing. (And it's due to the order of expected and actual being reversed).
So I reject your claim that it's too hard to understand in reverse.
I also think that if expectations were extensions, then I would have no problem reading EXPECT_LE(3, value) as value.EXPECT_LE(3), and since 'this' arguments tend to the the first logical argument, I would argue that ACTUAL, EXPECTED would be a better convention. Not that I'm trying to rock the boat, I'm just saying that I don't support your claim that the reverse order is hard to understand. I DO agree that it doesn't translate to infix operator notation nicely.
- Chad