llvm-project/libc
Guillaume Chatelet 7c02dc22e4 [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
2021-04-16 21:21:35 +00:00
..
AOR_v20.02
benchmarks
cmake/modules [libc][NFC] Add an alias named "check-llvmlibc" for "check-libc". 2021-03-22 16:55:34 +00:00
config [libc] Introduces gmtime_r to LLVM libc, based on C99/C2X/Single Unix Sp. 2021-03-22 14:04:05 -07:00
docs
fuzzing [libc] Make FPBits a union. 2021-04-13 09:21:35 -07:00
include
lib [libc] Add a target "install-llvmlibc" to install LLVM libc static archive. 2021-03-22 04:45:14 +00:00
loader
spec [libc] Introduces gmtime_r to LLVM libc, based on C99/C2X/Single Unix Sp. 2021-03-22 14:04:05 -07:00
src [libc] Make FPBits a union. 2021-04-13 09:21:35 -07:00
test [libc][NFC] Add template tests for a bunch of math functions. 2021-04-16 17:28:17 +00:00
utils [libc] Extends the testing framework to support typed test 2021-04-16 21:21:35 +00:00
CMakeLists.txt libc: Default LIBC_INSTALL_PREFIX to ${CMAKE_INSTALL_PREFIX} 2021-03-30 21:43:25 -07:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.