llvm-project/lldb/unittests/Utility
Jonas Devlieghere f78fcd6906 [lldb/Test] Rewrite ReproducerInstrumentationTest
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.
2020-04-10 16:50:44 -07:00
..
Inputs Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
AnsiTerminalTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ArchSpecTest.cpp [lldb] NFC: Fix trivial typo in comments, documents, and messages 2020-04-07 01:06:16 +09:00
ArgsTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
BroadcasterTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CMakeLists.txt Remap the target (Xcode) SDK directory to the host SDK directory. 2020-04-06 15:51:30 -07:00
CompletionRequestTest.cpp [lldb] Cut off unused suffix in CompletionRequest::GetRawLine 2020-01-28 11:12:22 +01:00
ConstStringTest.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
DataExtractorTest.cpp [LLDB] Let DataExtractor deal with two-byte addresses 2020-02-25 16:27:38 +01:00
EnvironmentTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
EventTest.cpp [ADT] Make StringRef's std::string conversion operator explicit 2020-01-28 23:47:07 +01:00
FileSpecTest.cpp [lldb/Test] Add unittest for FileSpec::operator bool() 2020-03-18 15:08:23 -07:00
FlagsTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ListenerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LogTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NameMatchesTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionsWithRawTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
PredicateTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ProcessInfoTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ProcessInstanceInfoTest.cpp [lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo 2020-03-12 14:38:37 -07:00
RangeMapTest.cpp Add unit tests for RangeDataVector::FindEntryIndexesThatContain 2020-02-26 16:47:42 +01:00
RangeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
RegisterValueTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
RegularExpressionTest.cpp [Utility] Reimplement RegularExpression on top of llvm::Regex 2019-08-16 21:25:36 +00:00
ReproducerInstrumentationTest.cpp [lldb/Test] Rewrite ReproducerInstrumentationTest 2020-04-10 16:50:44 -07:00
ReproducerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ScalarTest.cpp [ADT] Make StringRef's std::string conversion operator explicit 2020-01-28 23:47:07 +01:00
SharedClusterTest.cpp [lldb] Delete the SharingPtr class 2020-02-11 13:23:18 +01:00
StateTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StatusTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamTeeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamTest.cpp [lldb][NFC] Remove Stream::Indent(const char *) overload in favor of the StringRef version 2020-02-11 13:29:32 +01:00
StringExtractorTest.cpp [NFC] Return llvm::StringRef from StringExtractor::GetStringRef. 2019-08-21 04:55:56 +00:00
StringLexerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringListTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StructuredDataTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
SubsystemRAIITest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
TildeExpressionResolverTest.cpp Revert "[FileSystem] Make use of FS in TildeExpressionResolver" 2018-11-09 01:59:28 +00:00
TimeoutTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
TimerTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UUIDTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UriParserTest.cpp [LLDB] Fix parsing of IPv6 host:port inside brackets 2020-03-26 11:35:54 +01:00
UserIDResolverTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VASprintfTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VMRangeTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
XcodeSDKTest.cpp Remap the target (Xcode) SDK directory to the host SDK directory. 2020-04-06 15:51:30 -07:00