forked from OSchip/llvm-project
f78fcd6906
The instrumentation unit tests' current implementation uses global variables to track constructor calls for the instrumented classes during replay. This is suboptimal because it indirectly relies on how the reproducer instrumentation is implemented. I found out when adding support for passive replay and the test broke because we made an extra (temporary) copy of the instrumented objects. Additionally, the old approach wasn't very self-explanatory. It took me a bit of time to understand why we were expecting the number of objects in the test. This patch rewrites the test and uses the index-to-object-mapping to verify the objects created during replay. You can now specify the expected objects, in order, and whether they should be valid or not. I find that it makes the tests much easier to understand. More importantly, this approach is resilient to implementation detail changes in the instrumentation. |
||
---|---|---|
.. | ||
API | ||
Breakpoint | ||
Core | ||
DataFormatter | ||
Disassembler | ||
Editline | ||
Expression | ||
Host | ||
Interpreter | ||
Language | ||
ObjectFile | ||
Platform | ||
Process | ||
ScriptInterpreter | ||
Signals | ||
Symbol | ||
SymbolFile | ||
Target | ||
TestingSupport | ||
UnwindAssembly | ||
Utility | ||
debugserver | ||
tools | ||
CMakeLists.txt | ||
gtest_common.h |