aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2021-04-16 09:18:03 +0000
committerGuillaume Chatelet <gchatelet@google.com>2021-04-16 21:21:35 +0000
commit7c02dc22e487637abe752939c0e82d36be9921df (patch)
tree03e8a0ef1ac9eddf1bb235359666820550715f02 /clang/lib/CodeGen/CodeGenFunction.cpp
parent3e1045ec04a033c688aa40e961e26c38446f1139 (diff)
downloadllvm-7c02dc22e487637abe752939c0e82d36be9921df.zip
llvm-7c02dc22e487637abe752939c0e82d36be9921df.tar.gz
llvm-7c02dc22e487637abe752939c0e82d36be9921df.tar.bz2
[libc] Extends the testing framework to support typed test
This patch provides `TYPED_TEST` and `TYPED_TEST_F` (similar in functionnality to gtest). This is needed to extensively test building blocks for memory functions. Example for `TYPED_TEST_F`: ``` template <typename T> class LlvmLibcMyTestFixture : public testing::Test {}; using Types = testing::TypeList<char, int, long>; TYPED_TEST_F(LlvmLibcMyTestFixture, Simple, Types) { EXPECT_LE(sizeof(ParamType), 8UL); } ``` Example for `TYPED_TEST`: ``` using Types = testing::TypeList<char, int, long>; TYPED_TEST(LlvmLibcMyTest, Simple, Types) { EXPECT_LE(sizeof(ParamType), 8UL); } ``` `ParamType` is displayed as fully qualified canonical type which can be difficult to read, the user can provide a more readable name by using the `REGISTER_TYPE_NAME` macro. Differential Revision: https://reviews.llvm.org/D100631
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions