I'm using Google Test to assert that certain error codes occur, and these are always hex constants. So this output is less than ideal:
mytest.cpp line 130 and its output:
EXPECT_EQ(0xBFFF0011, error) << "Expected second close to return an error";
[ RUN ] MyTest.CloseSessionFail
mytest.cpp(130): error: Value of: error
Actual: -1074130544
Expected: 0xBFFF0011
Which is: 3221159953
Expected second close to return an error
For EXPECT_EQ(expected, actual), is there some way to cause it to format hexadecimal output?
Ideally I'd like to see this:
Actual: 0xBFFA1190
Expected: 0xBFFF0011
Probably this message will help you: https://github.com/google/googletest/issues/222
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With