[libc] [UnitTest] Add Matchers
authorAlex Brachet <alexbrachetmialot@gmail.com>
Thu, 5 Mar 2020 23:36:11 +0000 (18:36 -0500)
committerAlex Brachet <alexbrachetmialot@gmail.com>
Thu, 5 Mar 2020 23:36:11 +0000 (18:36 -0500)
commit1962bc1dfb728c6ebf44be9174d8a2a269ce0299
tree42b9223f0b836ce84d224a7707a343995743b8bc
parentcfff4851acc5132c8dcaebca6af92f817e133d66
[libc] [UnitTest] Add Matchers

Summary: This patch adds gtest-like matchers and `EXPECT|ASSERT_THAT` macros. It also adds matchers `Succeeds` and `Fails` and has examples using these in test/src/signal/sigaddset_test.cpp.

Reviewers: sivachandra, gchatelet, PaulkaToast

Reviewed By: sivachandra, PaulkaToast

Subscribers: mgorny, MaskRay, tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D75487
libc/test/src/signal/sigaddset_test.cpp
libc/utils/UnitTest/CMakeLists.txt
libc/utils/UnitTest/ErrnoSetterMatcher.h [new file with mode: 0644]
libc/utils/UnitTest/Test.cpp
libc/utils/UnitTest/Test.h
libc/utils/testutils/CMakeLists.txt
libc/utils/testutils/StreamWrapper.cpp [new file with mode: 0644]
libc/utils/testutils/StreamWrapper.h [new file with mode: 0644]