mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
ed1f03baaf
Summary: We already have a "Failed" matcher, which can be used to check any property of the Error object. However, most frequently one just wants to check the error message, and while this is possible with the "Failed" matcher, it is also very convoluted (Failed<ErrorInfoBase>(testing::Property(&ErrorInfoBase::message, "the message"))). Now, one can just write: FailedWithMessage("the message"). I expect that most of the usages will remain this simple, but the argument of the matcher is not limited to simple strings -- the argument of the matcher can be any other matcher, so one can write more complicated assertions if needed (FailedWithMessage(ContainsRegex("foo|bar"))). If one wants to match multiple error messages, he can pass multiple arguments to the matcher. If one wants to match the message list as a whole (perhaps to check the message count), I've also included a FailedWithMessageArray matcher, which takes a single matcher receiving a vector of error message strings. Reviewers: sammccall, dblaikie, jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74898 |
||
---|---|---|
.. | ||
DynamicLibrary | ||
AlignmentTest.cpp | ||
AlignOfTest.cpp | ||
AllocatorTest.cpp | ||
AnnotationsTest.cpp | ||
ARMAttributeParser.cpp | ||
ArrayRecyclerTest.cpp | ||
BinaryStreamTest.cpp | ||
BlockFrequencyTest.cpp | ||
BranchProbabilityTest.cpp | ||
CachePruningTest.cpp | ||
Casting.cpp | ||
CheckedArithmeticTest.cpp | ||
Chrono.cpp | ||
CMakeLists.txt | ||
CommandLineTest.cpp | ||
CompressionTest.cpp | ||
ConvertUTFTest.cpp | ||
CrashRecoveryTest.cpp | ||
CRCTest.cpp | ||
DataExtractorTest.cpp | ||
DebugCounterTest.cpp | ||
DebugTest.cpp | ||
DJBTest.cpp | ||
EndianStreamTest.cpp | ||
EndianTest.cpp | ||
ErrnoTest.cpp | ||
ErrorOrTest.cpp | ||
ErrorTest.cpp | ||
FileCheckTest.cpp | ||
FileCollectorTest.cpp | ||
FileOutputBufferTest.cpp | ||
FileUtilitiesTest.cpp | ||
formatted_raw_ostream_test.cpp | ||
FormatVariadicTest.cpp | ||
GlobPatternTest.cpp | ||
Host.cpp | ||
ItaniumManglingCanonicalizerTest.cpp | ||
JSONTest.cpp | ||
KnownBitsTest.cpp | ||
LEB128Test.cpp | ||
LineIteratorTest.cpp | ||
LockFileManagerTest.cpp | ||
ManagedStatic.cpp | ||
MatchersTest.cpp | ||
MathExtrasTest.cpp | ||
MD5Test.cpp | ||
MemoryBufferTest.cpp | ||
MemoryTest.cpp | ||
NativeFormatTests.cpp | ||
ParallelTest.cpp | ||
Path.cpp | ||
ProcessTest.cpp | ||
ProgramTest.cpp | ||
raw_ostream_test.cpp | ||
raw_pwrite_stream_test.cpp | ||
raw_sha1_ostream_test.cpp | ||
RegexTest.cpp | ||
ReplaceFileTest.cpp | ||
ReverseIterationTest.cpp | ||
ScaledNumberTest.cpp | ||
SourceMgrTest.cpp | ||
SpecialCaseListTest.cpp | ||
StringPool.cpp | ||
SwapByteOrderTest.cpp | ||
SymbolRemappingReaderTest.cpp | ||
TargetParserTest.cpp | ||
TarWriterTest.cpp | ||
TaskQueueTest.cpp | ||
Threading.cpp | ||
ThreadLocalTest.cpp | ||
ThreadPool.cpp | ||
TimerTest.cpp | ||
TrailingObjectsTest.cpp | ||
TrigramIndexTest.cpp | ||
TypeNameTest.cpp | ||
TypeTraitsTest.cpp | ||
UnicodeTest.cpp | ||
VersionTupleTest.cpp | ||
VirtualFileSystemTest.cpp | ||
xxhashTest.cpp | ||
YAMLIOTest.cpp | ||
YAMLParserTest.cpp |