Improved error messages for EndToEnd tests.#2937
Conversation
test/ExecutionFramework.h
Outdated
| u256 m_gasUsed; | ||
| }; | ||
|
|
||
| #define ABI_CHECK(RES, EXP) do { \ |
There was a problem hiding this comment.
Can you just use result and expected as in line with other macros we have?
|
Yeah it seems like |
db80ff9 to
e67eb73
Compare
|
Changed the name of the macro parameters and added another safety check inside the printing function. |
test/ExecutionFramework.h
Outdated
| u256 m_gasUsed; | ||
| }; | ||
|
|
||
| #define ABI_CHECK(RESULT, EXPECTATION) do { \ |
There was a problem hiding this comment.
Can you actually go lowercase since that is what we have in the rest of the code?
There was a problem hiding this comment.
Hm, also for preprocessor macros?
There was a problem hiding this comment.
Hm, mixed, but I'll make it lowercase.
There was a problem hiding this comment.
That is what we have. I don't think I've seen anywhere uppercase for macros, but could make sense, though I'd prefer to do a single sweeping change to update all macros for that style if decided on.
e67eb73 to
489d4fa
Compare
test/ExecutionFramework.cpp
Outdated
| for (size_t i = 0; i < std::max(resHex.size(), expHex.size()); i += 0x40) | ||
| { | ||
| std::string r{i >= resHex.size() ? string{} : resHex.substr(i, 0x40)}; | ||
| std::string e{i > expHex.size() ? string{} : expHex.substr(i, 0x40)}; |
There was a problem hiding this comment.
Hm, actually I think we should change these to a bit longer variants (perhaps res and exp) for readability in the below section.
There was a problem hiding this comment.
Changed it to longer variants.
489d4fa to
8e4f242
Compare
Much nicer to read and interpret error messages for mismatches in end to end test return data:
Where
Xmarks a mismatch and every0is replaced by..