llvm-c166/libc/test/UnitTest
Volodymyr Turanskyy 5ec690c35d
[libc] Enable bare-metal hermetic tests on Arm (#207361)
This provides missing components required to run LLVM libc hermetic
tests, for example, with QEMU:
- Redirect of output, time and exit to semihosting.
- Linker script.
- Extra LIBC_MATH_ASSUME_ROUND_NEAREST_ONLY setting for
LIBC_CONF_MATH_OPTIMIZATIONS to make hardfp tests pass.
2026-08-26 15:30:09 +01:00
..
ArmBaremetalTestUtils.cpp [libc] Enable bare-metal hermetic tests on Arm (#207361) 2026-08-26 15:30:09 +01:00
BazelFilePath.cpp
CmakeFilePath.cpp
CMakeLists.txt [libc] Enable bare-metal hermetic tests on Arm (#207361) 2026-08-26 15:30:09 +01:00
ConstraintHandlerCheckingTest.h
ErrnoCheckingTest.h
ErrnoSetterMatcher.h [libc] Update some syscall tests to be more tolerance to QEMU behaviors. (#208920) 2026-07-13 15:17:07 -04:00
ExecuteFunction.h
ExecuteFunctionUnix.cpp
FEnvSafeTest.cpp
FEnvSafeTest.h
FPExceptMatcher.cpp
FPExceptMatcher.h
FPMatcher.h [libc][math] Integer-only, statically rounded implementation of expf (#209406) 2026-08-23 11:34:41 -04:00
GTest.h
HermeticTestUtils.cpp
LibcCTest.cpp
LibcCTest.h
LibcDeathTestExecutors.cpp
LibcTest.cpp [libc] Add support for wchar_t in StringConverter. (#211867) 2026-08-19 10:07:25 -04:00
LibcTest.h
LibcTestMain.cpp
llvm-libc-baremetal.ld [libc] Enable bare-metal hermetic tests on Arm (#207361) 2026-08-26 15:30:09 +01:00
MemoryMatcher.cpp
MemoryMatcher.h
PrintfMatcher.cpp
PrintfMatcher.h
README.md
RoundingModeUtils.cpp [libc][math] Integer-only, statically rounded implementation of expf (#209406) 2026-08-23 11:34:41 -04:00
RoundingModeUtils.h [libc][math] Integer-only, statically rounded implementation of expf (#209406) 2026-08-23 11:34:41 -04:00
ScanfMatcher.cpp [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) 2025-07-23 20:19:52 -04:00
ScanfMatcher.h [libc] remove errno.h includes (#110934) 2024-10-05 19:31:36 -04:00
SIMDMatcher.h
StringUtils.h
Test.h
TestLogger.cpp
TestLogger.h
ZxTest.h

The LLVM libc unit test framework

This directory contains a lightweight implementation of a gtest like unit test framework for LLVM libc.

Why not gtest?

While gtest is great, featureful and time tested, it uses the C and C++ standard libraries. Hence, using it to test LLVM libc (which is also an implementation of the C standard libraries) causes various kinds of mixup/conflict problems.

How is it different from gtest?

LLVM libc's unit test framework is much less featureful as compared to gtest. But, what is available strives to be exactly like gtest.

Will it be made as featureful as gtest in future?

It is not clear if LLVM libc needs/will need every feature of gtest. We only intend to extend it on an as needed basis. Hence, it might never be as featureful as gtest.