[PATCH] D33059: Create an shared include directory for gtest helper functions

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 22:21:30 PDT 2017


zturner updated this revision to Diff 101343.
zturner added a comment.

Trying this again.

Note that this time I went all the way and added matchers instead of the hand rolled macros. that delegate to `EXPECT_TRUE` etc.  Since gmock doesn't support matchers that modify their arguments, the solution here is to make a new `EXPECT / ASSERT` macro pair that consumes the Error, converting it into a format that can easily be copied around and passed through the mock infrastructure.

There's still some uses of hand rolled macros related to `std::error_code` in various tests, but I think it's too much for one patch.  Maybe in a followup


https://reviews.llvm.org/D33059

Files:
  llvm/cmake/modules/AddLLVM.cmake
  llvm/unittests/DebugInfo/CodeView/CMakeLists.txt
  llvm/unittests/DebugInfo/CodeView/ErrorChecking.h
  llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
  llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
  llvm/unittests/DebugInfo/PDB/CMakeLists.txt
  llvm/unittests/DebugInfo/PDB/ErrorChecking.h
  llvm/unittests/DebugInfo/PDB/HashTableTest.cpp
  llvm/unittests/DebugInfo/PDB/MSFBuilderTest.cpp
  llvm/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
  llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp
  llvm/unittests/DebugInfo/PDB/TypeServerHandlerTest.cpp
  llvm/unittests/Support/BinaryStreamTest.cpp
  llvm/unittests/Support/CMakeLists.txt
  llvm/utils/unittest/CMakeLists.txt
  llvm/utils/unittest/Helpers/CMakeLists.txt
  llvm/utils/unittest/Helpers/LLVMBuild.txt
  llvm/utils/unittest/Helpers/UnitTestHelpers/CMakeLists.txt
  llvm/utils/unittest/Helpers/UnitTestHelpers/Error.cpp
  llvm/utils/unittest/Helpers/UnitTestHelpers/LLVMBuild.txt
  llvm/utils/unittest/Helpers/include/UnitTestHelpers/Error.h
  llvm/utils/unittest/LLVMBuild.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33059.101343.patch
Type: text/x-patch
Size: 68801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170604/64973b4d/attachment.bin>


More information about the llvm-commits mailing list