[PATCH] D33059: Create an shared include directory for gtest helper functions
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 19:31:33 PDT 2017
zturner added a comment.
To motivate the gmock specific portion, here are some examples of what happens when you get a test failure now using the new gmock matchers as implemented in this patch.
Error fails when you expect it to succeed:
E:\src\llvm-mono\llvm\unittests\DebugInfo\PDB\MappedBlockStreamTest.cpp(189): error: Value of: llvm::detail::TakeError(R.readFixedString(Str, 11))
Expected: succeeded
Actual: failed (Stream Error: The stream is too short to perform the requested operation.)
Expected fails when you expected it to succeed
E:\src\llvm-mono\llvm\unittests\DebugInfo\PDB\MSFBuilderTest.cpp(250): error: Value of: llvm::detail::TakeExpected(Msf.addStream(6144, Blocks))
Expected: succeeded
Actual: failed (MSF Error: Attempt to re-use an already allocated block)
Expected<T> operation succeeded but doesn't have the expected value.
E:\src\llvm-mono\llvm\unittests\DebugInfo\PDB\StringTableBuilderTest.cpp(51): error: Value of: llvm::detail::TakeExpected(Table.getStringForID(3))
Expected: succeeded with value "baz"
Actual: succeeded with value "{ 'o' (111, 0x6F) }", but "{ 'o' (111, 0x6F) }" != "baz"
Expected<T> operation failed when you expected it to succeed with a certain value.
E:\src\llvm-mono\llvm\unittests\DebugInfo\PDB\StringTableBuilderTest.cpp(52): error: Value of: llvm::detail::TakeExpected(Table.getIDForString("abc"))
Expected: succeeded with value 1
Actual: failed (Native PDB Error: The entry does not exist.), operation failed
https://reviews.llvm.org/D33059
More information about the llvm-commits
mailing list