-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
1 changed file
with
130 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters