Description
When the compared variable is changed within the equality test expression, such as EXPECT_EQ, the variable is changed for the second time when SkyPat is showing error message.
Code
In this case, the left-hand side is 11.
PAT_F(IntegerTest, eq_test)
{
int a = 10;
EXPECT_EQ(++a, 12);
}
Result
But the error shows 12 instead of 11.
[----------] 1 test from IntegerTest.
[ RUN ] IntegerTest.eq_test
[ FAILED ]
IntegerTest.cpp:5: error: failed to expect
Value of: (++a == 12)
Actual: 12
Expected: 12
Expectation
Description
When the compared variable is changed within the equality test expression, such as
EXPECT_EQ, the variable is changed for the second time when SkyPat is showing error message.Code
In this case, the left-hand side is
11.Result
But the error shows
12instead of11.Expectation