You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test OneTest calls dependency_function only once by calling function_under_test. The expect value and the actual value is different. The error message is Mock Failure: Unexpected additional (2nd) call to function: dependency_function. It should be CHECK_EQUAL error, expect=6, actual=5.
Maybe the test macro should evaluate the argument only once to avoid repeating the side effect of the argument function. For example:
The current solution (which unfortunately doesn't cover your problem) was added in 97576dc.
I would guess that the reasoning behind this implementation was the fact that decltype is not supported in language standards prior C++11. Maybe @basvodde knows more on the background of this decision back then.
In fact, I'd say, there's one central question: does CppUTest want to stay compatible with older C++-standards (if it's still compatible with older standards, at all), or does it address modern C++? I don't know if there is any statement, which language standard is officially supported/targeted?
The test
OneTest
callsdependency_function
only once by callingfunction_under_test
. The expect value and the actual value is different. The error message isMock Failure: Unexpected additional (2nd) call to function: dependency_function
. It should beCHECK_EQUAL error, expect=6, actual=5
.Maybe the test macro should evaluate the argument only once to avoid repeating the side effect of the argument function. For example:
The text was updated successfully, but these errors were encountered: