[libc-commits] [libc] 1df0dbf - [libc][NFC] add "LlvmLibc" as a prefix to all test names
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Jan 20 15:23:38 PST 2021
Author: Michael Jones
Date: 2021-01-20T23:15:36Z
New Revision: 1df0dbfcb5c0b90299fe5b74caf42e4cacce16fc
URL: https://github.com/llvm/llvm-project/commit/1df0dbfcb5c0b90299fe5b74caf42e4cacce16fc
DIFF: https://github.com/llvm/llvm-project/commit/1df0dbfcb5c0b90299fe5b74caf42e4cacce16fc.diff
LOG: [libc][NFC] add "LlvmLibc" as a prefix to all test names
Summary:
Having a consistent prefix makes selecting all of the llvm libc tests
easier on any platform that is also using the gtest framework.
This also modifies the TEST and TEST_F macros to enforce this change
moving forward.
Reviewers: sivachandra
Subscribers:
Added:
Modified:
libc/test/config/linux/x86_64/syscall_test.cpp
libc/test/src/assert/assert_test.cpp
libc/test/src/ctype/isalnum_test.cpp
libc/test/src/ctype/isalpha_test.cpp
libc/test/src/ctype/isascii_test.cpp
libc/test/src/ctype/isblank_test.cpp
libc/test/src/ctype/iscntrl_test.cpp
libc/test/src/ctype/isdigit_test.cpp
libc/test/src/ctype/isgraph_test.cpp
libc/test/src/ctype/islower_test.cpp
libc/test/src/ctype/isprint_test.cpp
libc/test/src/ctype/ispunct_test.cpp
libc/test/src/ctype/isspace_test.cpp
libc/test/src/ctype/isupper_test.cpp
libc/test/src/ctype/isxdigit_test.cpp
libc/test/src/ctype/toascii_test.cpp
libc/test/src/ctype/tolower_test.cpp
libc/test/src/ctype/toupper_test.cpp
libc/test/src/errno/errno_test.cpp
libc/test/src/fenv/enabled_exceptions_test.cpp
libc/test/src/fenv/exception_status_test.cpp
libc/test/src/fenv/rounding_mode_test.cpp
libc/test/src/math/FDimTest.h
libc/test/src/math/ILogbTest.h
libc/test/src/math/LdExpTest.h
libc/test/src/math/NextAfterTest.h
libc/test/src/math/ceil_test.cpp
libc/test/src/math/ceilf_test.cpp
libc/test/src/math/ceill_test.cpp
libc/test/src/math/copysign_test.cpp
libc/test/src/math/copysignf_test.cpp
libc/test/src/math/copysignl_test.cpp
libc/test/src/math/cosf_test.cpp
libc/test/src/math/exp2f_test.cpp
libc/test/src/math/expf_test.cpp
libc/test/src/math/fabs_test.cpp
libc/test/src/math/fabsf_test.cpp
libc/test/src/math/fabsl_test.cpp
libc/test/src/math/fdim_test.cpp
libc/test/src/math/fdimf_test.cpp
libc/test/src/math/fdiml_test.cpp
libc/test/src/math/floor_test.cpp
libc/test/src/math/floorf_test.cpp
libc/test/src/math/floorl_test.cpp
libc/test/src/math/fmaf_test.cpp
libc/test/src/math/fmax_test.cpp
libc/test/src/math/fmaxf_test.cpp
libc/test/src/math/fmaxl_test.cpp
libc/test/src/math/fmin_test.cpp
libc/test/src/math/fminf_test.cpp
libc/test/src/math/fminl_test.cpp
libc/test/src/math/frexp_test.cpp
libc/test/src/math/frexpf_test.cpp
libc/test/src/math/frexpl_test.cpp
libc/test/src/math/hypot_test.cpp
libc/test/src/math/hypotf_test.cpp
libc/test/src/math/ilogb_test.cpp
libc/test/src/math/ilogbf_test.cpp
libc/test/src/math/ilogbl_test.cpp
libc/test/src/math/logb_test.cpp
libc/test/src/math/logbf_test.cpp
libc/test/src/math/logbl_test.cpp
libc/test/src/math/modf_test.cpp
libc/test/src/math/modff_test.cpp
libc/test/src/math/modfl_test.cpp
libc/test/src/math/round_test.cpp
libc/test/src/math/roundf_test.cpp
libc/test/src/math/roundl_test.cpp
libc/test/src/math/sincosf_test.cpp
libc/test/src/math/sinf_test.cpp
libc/test/src/math/sqrt_test.cpp
libc/test/src/math/sqrtf_test.cpp
libc/test/src/math/sqrtl_test.cpp
libc/test/src/math/trunc_test.cpp
libc/test/src/math/truncf_test.cpp
libc/test/src/math/truncl_test.cpp
libc/test/src/signal/raise_test.cpp
libc/test/src/signal/sigaction_test.cpp
libc/test/src/signal/sigaddset_test.cpp
libc/test/src/signal/sigdelset_test.cpp
libc/test/src/signal/sigfillset_test.cpp
libc/test/src/signal/signal_test.cpp
libc/test/src/signal/sigprocmask_test.cpp
libc/test/src/stdio/fwrite_test.cpp
libc/test/src/stdlib/_Exit_test.cpp
libc/test/src/stdlib/abort_test.cpp
libc/test/src/stdlib/abs_test.cpp
libc/test/src/stdlib/labs_test.cpp
libc/test/src/stdlib/llabs_test.cpp
libc/test/src/string/bzero_test.cpp
libc/test/src/string/memchr_test.cpp
libc/test/src/string/memcmp_test.cpp
libc/test/src/string/memcpy_test.cpp
libc/test/src/string/memmove_test.cpp
libc/test/src/string/memory_utils/memcpy_utils_test.cpp
libc/test/src/string/memory_utils/utils_test.cpp
libc/test/src/string/memrchr_test.cpp
libc/test/src/string/memset_test.cpp
libc/test/src/string/strcat_test.cpp
libc/test/src/string/strchr_test.cpp
libc/test/src/string/strcmp_test.cpp
libc/test/src/string/strcpy_test.cpp
libc/test/src/string/strcspn_test.cpp
libc/test/src/string/strlen_test.cpp
libc/test/src/string/strncpy_test.cpp
libc/test/src/string/strnlen_test.cpp
libc/test/src/string/strpbrk_test.cpp
libc/test/src/string/strrchr_test.cpp
libc/test/src/string/strspn_test.cpp
libc/test/src/string/strstr_test.cpp
libc/test/src/string/strtok_r_test.cpp
libc/test/src/string/strtok_test.cpp
libc/test/src/sys/mman/linux/mmap_test.cpp
libc/test/src/threads/call_once_test.cpp
libc/test/src/threads/mtx_test.cpp
libc/test/src/threads/thrd_test.cpp
libc/test/src/time/mktime_test.cpp
libc/test/src/unistd/write_test.cpp
libc/test/utils/CPP/bitset_test.cpp
libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
libc/utils/UnitTest/LibcTest.h
Removed:
################################################################################
diff --git a/libc/test/config/linux/x86_64/syscall_test.cpp b/libc/test/config/linux/x86_64/syscall_test.cpp
index 160255c511f0..a6746a4f235b 100644
--- a/libc/test/config/linux/x86_64/syscall_test.cpp
+++ b/libc/test/config/linux/x86_64/syscall_test.cpp
@@ -11,7 +11,7 @@
#include "utils/CPP/Functional.h"
-TEST(X86_64_SyscallTest, APITest) {
+TEST(LlvmLibcX86_64_SyscallTest, APITest) {
// We only do a signature test here. Actual functionality tests are
// done by the unit tests of the syscall wrappers like mmap.
diff --git a/libc/test/src/assert/assert_test.cpp b/libc/test/src/assert/assert_test.cpp
index 035c9628a679..b22f4984de99 100644
--- a/libc/test/src/assert/assert_test.cpp
+++ b/libc/test/src/assert/assert_test.cpp
@@ -12,7 +12,7 @@
extern "C" int close(int);
-TEST(Assert, Enabled) {
+TEST(LlvmLibcAssert, Enabled) {
// -1 matches against any signal, which is necessary for now until
// __llvm_libc::abort() unblocks SIGABRT. Close standard error for the
// child process so we don't print the assertion failure message.
@@ -27,6 +27,6 @@ TEST(Assert, Enabled) {
#define NDEBUG
#include "src/assert/assert.h"
-TEST(Assert, Disabled) {
+TEST(LlvmLibcAssert, Disabled) {
EXPECT_EXITS([] { assert(0); }, 0);
}
diff --git a/libc/test/src/ctype/isalnum_test.cpp b/libc/test/src/ctype/isalnum_test.cpp
index ca77285c5614..5ee0bbd07b07 100644
--- a/libc/test/src/ctype/isalnum_test.cpp
+++ b/libc/test/src/ctype/isalnum_test.cpp
@@ -10,7 +10,7 @@
#include "utils/UnitTest/Test.h"
-TEST(IsAlNum, DefaultLocale) {
+TEST(LlvmLibcIsAlNum, DefaultLocale) {
// Loops through all characters, verifying that numbers and letters
// return non-zero integer and everything else returns a zero.
for (int c = 0; c < 255; ++c) {
diff --git a/libc/test/src/ctype/isalpha_test.cpp b/libc/test/src/ctype/isalpha_test.cpp
index d91219b50406..e709981d4904 100644
--- a/libc/test/src/ctype/isalpha_test.cpp
+++ b/libc/test/src/ctype/isalpha_test.cpp
@@ -10,7 +10,7 @@
#include "utils/UnitTest/Test.h"
-TEST(IsAlpha, DefaultLocale) {
+TEST(LlvmLibcIsAlpha, DefaultLocale) {
// Loops through all characters, verifying that letters return a
// non-zero integer and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isascii_test.cpp b/libc/test/src/ctype/isascii_test.cpp
index e0a15a0a5a29..ec69cd974be8 100644
--- a/libc/test/src/ctype/isascii_test.cpp
+++ b/libc/test/src/ctype/isascii_test.cpp
@@ -10,7 +10,7 @@
#include "src/ctype/isascii.h"
-TEST(IsAscii, DefaultLocale) {
+TEST(LlvmLibcIsAscii, DefaultLocale) {
// Loops through all characters, verifying that ascii characters
// (which are all 7 bit unsigned integers)
// return a non-zero integer and everything else returns zero.
diff --git a/libc/test/src/ctype/isblank_test.cpp b/libc/test/src/ctype/isblank_test.cpp
index f024ef67f9f6..1cb5c501727f 100644
--- a/libc/test/src/ctype/isblank_test.cpp
+++ b/libc/test/src/ctype/isblank_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isblank.h"
#include "utils/UnitTest/Test.h"
-TEST(IsBlank, DefaultLocale) {
+TEST(LlvmLibcIsBlank, DefaultLocale) {
// Loops through all characters, verifying that space and horizontal tab
// return a non-zero integer and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/iscntrl_test.cpp b/libc/test/src/ctype/iscntrl_test.cpp
index 5af7457cbda4..59903b3e36b9 100644
--- a/libc/test/src/ctype/iscntrl_test.cpp
+++ b/libc/test/src/ctype/iscntrl_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/iscntrl.h"
#include "utils/UnitTest/Test.h"
-TEST(IsCntrl, DefaultLocale) {
+TEST(LlvmLibcIsCntrl, DefaultLocale) {
// Loops through all characters, verifying that control characters
// return a non-zero integer, all others return zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isdigit_test.cpp b/libc/test/src/ctype/isdigit_test.cpp
index 2430a92425c4..4ae08f81d896 100644
--- a/libc/test/src/ctype/isdigit_test.cpp
+++ b/libc/test/src/ctype/isdigit_test.cpp
@@ -10,7 +10,7 @@
#include "utils/UnitTest/Test.h"
-TEST(IsDigit, DefaultLocale) {
+TEST(LlvmLibcIsDigit, DefaultLocale) {
// Loops through all characters, verifying that numbers return a
// non-zero integer and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isgraph_test.cpp b/libc/test/src/ctype/isgraph_test.cpp
index 1ed1ec7145f6..2ec8c8c0b847 100644
--- a/libc/test/src/ctype/isgraph_test.cpp
+++ b/libc/test/src/ctype/isgraph_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isgraph.h"
#include "utils/UnitTest/Test.h"
-TEST(IsGraph, DefaultLocale) {
+TEST(LlvmLibcIsGraph, DefaultLocale) {
// Loops through all characters, verifying that graphical characters
// return a non-zero integer, everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/islower_test.cpp b/libc/test/src/ctype/islower_test.cpp
index 9b38cabc67aa..44051ea8f08b 100644
--- a/libc/test/src/ctype/islower_test.cpp
+++ b/libc/test/src/ctype/islower_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/islower.h"
#include "utils/UnitTest/Test.h"
-TEST(IsLower, DefaultLocale) {
+TEST(LlvmLibcIsLower, DefaultLocale) {
// Loops through all characters, verifying that lowercase letters
// return a non-zero integer and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isprint_test.cpp b/libc/test/src/ctype/isprint_test.cpp
index 565453e0013c..7ada137d4921 100644
--- a/libc/test/src/ctype/isprint_test.cpp
+++ b/libc/test/src/ctype/isprint_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isprint.h"
#include "utils/UnitTest/Test.h"
-TEST(IsPrint, DefaultLocale) {
+TEST(LlvmLibcIsPrint, DefaultLocale) {
for (int ch = 0; ch < 255; ++ch) {
if (' ' <= ch && ch <= '~') // A-Z, a-z, 0-9, punctuation, space.
EXPECT_NE(__llvm_libc::isprint(ch), 0);
diff --git a/libc/test/src/ctype/ispunct_test.cpp b/libc/test/src/ctype/ispunct_test.cpp
index 07e83fb36c7c..322f050f86af 100644
--- a/libc/test/src/ctype/ispunct_test.cpp
+++ b/libc/test/src/ctype/ispunct_test.cpp
@@ -22,7 +22,7 @@ static inline int is_punctuation_character(int c) {
('[' <= c && c <= '`') || ('{' <= c && c <= '~');
}
-TEST(IsPunct, DefaultLocale) {
+TEST(LlvmLibcIsPunct, DefaultLocale) {
// Loops through all characters, verifying that punctuation characters
// return a non-zero integer, and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isspace_test.cpp b/libc/test/src/ctype/isspace_test.cpp
index e1caded67452..8cf66c4f65c4 100644
--- a/libc/test/src/ctype/isspace_test.cpp
+++ b/libc/test/src/ctype/isspace_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isspace.h"
#include "utils/UnitTest/Test.h"
-TEST(IsSpace, DefaultLocale) {
+TEST(LlvmLibcIsSpace, DefaultLocale) {
// Loops through all characters, verifying that space characters
// return true and everything else returns false.
// Hexadecimal | Symbol
diff --git a/libc/test/src/ctype/isupper_test.cpp b/libc/test/src/ctype/isupper_test.cpp
index 0a13f4e11b0e..fad91e3629d9 100644
--- a/libc/test/src/ctype/isupper_test.cpp
+++ b/libc/test/src/ctype/isupper_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isupper.h"
#include "utils/UnitTest/Test.h"
-TEST(IsUpper, DefaultLocale) {
+TEST(LlvmLibcIsUpper, DefaultLocale) {
// Loops through all characters, verifying that uppercase letters
// return a non-zero integer and everything else returns zero.
for (int ch = 0; ch < 255; ++ch) {
diff --git a/libc/test/src/ctype/isxdigit_test.cpp b/libc/test/src/ctype/isxdigit_test.cpp
index 570cb82b3c78..e52fad9a1334 100644
--- a/libc/test/src/ctype/isxdigit_test.cpp
+++ b/libc/test/src/ctype/isxdigit_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/isxdigit.h"
#include "utils/UnitTest/Test.h"
-TEST(IsXDigit, DefaultLocale) {
+TEST(LlvmLibcIsXDigit, DefaultLocale) {
for (int ch = 0; ch < 255; ++ch) {
if (('0' <= ch && ch <= '9') || ('a' <= ch && ch <= 'f') ||
('A' <= ch && ch <= 'F'))
diff --git a/libc/test/src/ctype/toascii_test.cpp b/libc/test/src/ctype/toascii_test.cpp
index 1a47ae5b45c3..7680475ba702 100644
--- a/libc/test/src/ctype/toascii_test.cpp
+++ b/libc/test/src/ctype/toascii_test.cpp
@@ -10,7 +10,7 @@
#include "utils/UnitTest/Test.h"
-TEST(ToAscii, DefaultLocale) {
+TEST(LlvmLibcToAscii, DefaultLocale) {
// Loops through all characters, verifying that ascii characters
// (which are all 7 bit unsigned integers)
// return themself, and that all other characters return themself
diff --git a/libc/test/src/ctype/tolower_test.cpp b/libc/test/src/ctype/tolower_test.cpp
index 096ef969bf63..dd4ebacfd4e7 100644
--- a/libc/test/src/ctype/tolower_test.cpp
+++ b/libc/test/src/ctype/tolower_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/tolower.h"
#include "utils/UnitTest/Test.h"
-TEST(ToLower, DefaultLocale) {
+TEST(LlvmLibcToLower, DefaultLocale) {
for (int ch = 0; ch < 255; ++ch) {
// This follows pattern 'A' + 32 = 'a'.
if ('A' <= ch && ch <= 'Z')
diff --git a/libc/test/src/ctype/toupper_test.cpp b/libc/test/src/ctype/toupper_test.cpp
index 4d6a1b3d4f65..e25c57f29d28 100644
--- a/libc/test/src/ctype/toupper_test.cpp
+++ b/libc/test/src/ctype/toupper_test.cpp
@@ -9,7 +9,7 @@
#include "src/ctype/toupper.h"
#include "utils/UnitTest/Test.h"
-TEST(ToUpper, DefaultLocale) {
+TEST(LlvmLibcToUpper, DefaultLocale) {
for (int ch = 0; ch < 255; ++ch) {
// This follows pattern 'a' - 32 = 'A'.
if ('a' <= ch && ch <= 'z')
diff --git a/libc/test/src/errno/errno_test.cpp b/libc/test/src/errno/errno_test.cpp
index b717a37b34a7..a310dc88e03d 100644
--- a/libc/test/src/errno/errno_test.cpp
+++ b/libc/test/src/errno/errno_test.cpp
@@ -9,7 +9,7 @@
#include "src/errno/llvmlibc_errno.h"
#include "utils/UnitTest/Test.h"
-TEST(ErrnoTest, Basic) {
+TEST(LlvmLibcErrnoTest, Basic) {
int test_val = 123;
llvmlibc_errno = test_val;
ASSERT_EQ(test_val, llvmlibc_errno);
diff --git a/libc/test/src/fenv/enabled_exceptions_test.cpp b/libc/test/src/fenv/enabled_exceptions_test.cpp
index 23151286a907..81cd4947cc76 100644
--- a/libc/test/src/fenv/enabled_exceptions_test.cpp
+++ b/libc/test/src/fenv/enabled_exceptions_test.cpp
@@ -18,7 +18,7 @@
// This test enables an exception and verifies that raising that exception
// triggers SIGFPE.
-TEST(ExceptionStatusTest, RaiseAndCrash) {
+TEST(LlvmLibcExceptionStatusTest, RaiseAndCrash) {
// TODO: Install a floating point exception handler and verify that the
// the expected exception was raised. One will have to longjmp back from
// that exception handler, so such a testing can be done after we have
diff --git a/libc/test/src/fenv/exception_status_test.cpp b/libc/test/src/fenv/exception_status_test.cpp
index 0706b5525c00..466ef7cd6220 100644
--- a/libc/test/src/fenv/exception_status_test.cpp
+++ b/libc/test/src/fenv/exception_status_test.cpp
@@ -15,7 +15,7 @@
#include <fenv.h>
-TEST(ExceptionStatusTest, RaiseAndTest) {
+TEST(LlvmLibcExceptionStatusTest, RaiseAndTest) {
// This test raises a set of exceptions and checks that the exception
// status flags are updated. The intention is really not to invoke the
// exception handler. Hence, we will disable all exceptions at the
diff --git a/libc/test/src/fenv/rounding_mode_test.cpp b/libc/test/src/fenv/rounding_mode_test.cpp
index 73daf9db30bb..66f564d174e3 100644
--- a/libc/test/src/fenv/rounding_mode_test.cpp
+++ b/libc/test/src/fenv/rounding_mode_test.cpp
@@ -13,7 +13,7 @@
#include <fenv.h>
-TEST(RoundingModeTest, SetAndGet) {
+TEST(LlvmLibcRoundingModeTest, SetAndGet) {
int s = __llvm_libc::fesetround(FE_TONEAREST);
EXPECT_EQ(s, 0);
int rm = __llvm_libc::fegetround();
diff --git a/libc/test/src/math/FDimTest.h b/libc/test/src/math/FDimTest.h
index 4b95427b113b..d632b2355638 100644
--- a/libc/test/src/math/FDimTest.h
+++ b/libc/test/src/math/FDimTest.h
@@ -79,4 +79,4 @@ class FDimTestTemplate : public __llvm_libc::testing::Test {
const T negInf = __llvm_libc::fputil::FPBits<T>::negInf();
const T zero = __llvm_libc::fputil::FPBits<T>::zero();
const T negZero = __llvm_libc::fputil::FPBits<T>::negZero();
-};
+};
\ No newline at end of file
diff --git a/libc/test/src/math/ILogbTest.h b/libc/test/src/math/ILogbTest.h
index 2483907ca8e6..724cc9571670 100644
--- a/libc/test/src/math/ILogbTest.h
+++ b/libc/test/src/math/ILogbTest.h
@@ -16,7 +16,7 @@
#include <limits.h>
-class ILogbTest : public __llvm_libc::testing::Test {
+class LlvmLibcILogbTest : public __llvm_libc::testing::Test {
public:
template <typename T> struct ILogbFunc { typedef int (*Func)(T); };
diff --git a/libc/test/src/math/LdExpTest.h b/libc/test/src/math/LdExpTest.h
index 0a910bddb371..c4f18657a339 100644
--- a/libc/test/src/math/LdExpTest.h
+++ b/libc/test/src/math/LdExpTest.h
@@ -140,16 +140,16 @@ class LdExpTestTemplate : public __llvm_libc::testing::Test {
};
#define LIST_LDEXP_TESTS(T, func) \
- using LdExpTest = LdExpTestTemplate<T>; \
- TEST_F(LdExpTest, SpecialNumbers) { testSpecialNumbers(&func); } \
- TEST_F(LdExpTest, PowersOfTwo) { testPowersOfTwo(&func); } \
- TEST_F(LdExpTest, OverFlow) { testOverflow(&func); } \
- TEST_F(LdExpTest, UnderflowToZeroOnNormal) { \
+ using LlvmLibcLdExpTest = LdExpTestTemplate<T>; \
+ TEST_F(LlvmLibcLdExpTest, SpecialNumbers) { testSpecialNumbers(&func); } \
+ TEST_F(LlvmLibcLdExpTest, PowersOfTwo) { testPowersOfTwo(&func); } \
+ TEST_F(LlvmLibcLdExpTest, OverFlow) { testOverflow(&func); } \
+ TEST_F(LlvmLibcLdExpTest, UnderflowToZeroOnNormal) { \
testUnderflowToZeroOnNormal(&func); \
} \
- TEST_F(LdExpTest, UnderflowToZeroOnSubnormal) { \
+ TEST_F(LlvmLibcLdExpTest, UnderflowToZeroOnSubnormal) { \
testUnderflowToZeroOnSubnormal(&func); \
} \
- TEST_F(LdExpTest, NormalOperation) { testNormalOperation(&func); }
+ TEST_F(LlvmLibcLdExpTest, NormalOperation) { testNormalOperation(&func); }
#endif // LLVM_LIBC_TEST_SRC_MATH_LDEXPTEST_H
diff --git a/libc/test/src/math/NextAfterTest.h b/libc/test/src/math/NextAfterTest.h
index 6286aa9ef18a..c7e520175d1f 100644
--- a/libc/test/src/math/NextAfterTest.h
+++ b/libc/test/src/math/NextAfterTest.h
@@ -186,8 +186,8 @@ class NextAfterTestTemplate : public __llvm_libc::testing::Test {
};
#define LIST_NEXTAFTER_TESTS(T, func) \
- using NextAfterTest = NextAfterTestTemplate<T>; \
- TEST_F(NextAfterTest, TestNaN) { testNaN(&func); } \
- TEST_F(NextAfterTest, TestBoundaries) { testBoundaries(&func); }
+ using LlvmLibcNextAfterTest = NextAfterTestTemplate<T>; \
+ TEST_F(LlvmLibcNextAfterTest, TestNaN) { testNaN(&func); } \
+ TEST_F(LlvmLibcNextAfterTest, TestBoundaries) { testBoundaries(&func); }
#endif // LLVM_LIBC_TEST_SRC_MATH_NEXTAFTERTEST_H
diff --git a/libc/test/src/math/ceil_test.cpp b/libc/test/src/math/ceil_test.cpp
index 6019ce5a8337..2fd5c439f229 100644
--- a/libc/test/src/math/ceil_test.cpp
+++ b/libc/test/src/math/ceil_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(CeilTest, SpecialNumbers) {
+TEST(LlvmLibcCeilTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::ceil(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::ceil(negZero));
@@ -29,7 +29,7 @@ TEST(CeilTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::ceil(aNaN));
}
-TEST(CeilTest, RoundedNumbers) {
+TEST(LlvmLibcCeilTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0, __llvm_libc::ceil(1.0));
EXPECT_FP_EQ(-1.0, __llvm_libc::ceil(-1.0));
EXPECT_FP_EQ(10.0, __llvm_libc::ceil(10.0));
@@ -38,7 +38,7 @@ TEST(CeilTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::ceil(-1234.0));
}
-TEST(CeilTest, Fractions) {
+TEST(LlvmLibcCeilTest, Fractions) {
EXPECT_FP_EQ(1.0, __llvm_libc::ceil(0.5));
EXPECT_FP_EQ(-0.0, __llvm_libc::ceil(-0.5));
EXPECT_FP_EQ(1.0, __llvm_libc::ceil(0.115));
@@ -61,7 +61,7 @@ TEST(CeilTest, Fractions) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::ceil(-1234.96));
}
-TEST(CeilTest, InDoubleRange) {
+TEST(LlvmLibcCeilTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/ceilf_test.cpp b/libc/test/src/math/ceilf_test.cpp
index 9f4cc74d249a..dc20970d03f1 100644
--- a/libc/test/src/math/ceilf_test.cpp
+++ b/libc/test/src/math/ceilf_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(CeilfTest, SpecialNumbers) {
+TEST(LlvmLibcCeilfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::ceilf(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::ceilf(negZero));
@@ -29,7 +29,7 @@ TEST(CeilfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::ceilf(aNaN));
}
-TEST(CeilfTest, RoundedNumbers) {
+TEST(LlvmLibcCeilfTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0f, __llvm_libc::ceilf(1.0f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::ceilf(-1.0f));
EXPECT_FP_EQ(10.0f, __llvm_libc::ceilf(10.0f));
@@ -38,7 +38,7 @@ TEST(CeilfTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::ceilf(-1234.0f));
}
-TEST(CeilfTest, Fractions) {
+TEST(LlvmLibcCeilfTest, Fractions) {
EXPECT_FP_EQ(1.0f, __llvm_libc::ceilf(0.5f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::ceilf(-0.5f));
EXPECT_FP_EQ(1.0f, __llvm_libc::ceilf(0.115f));
@@ -61,7 +61,7 @@ TEST(CeilfTest, Fractions) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::ceilf(-1234.96f));
}
-TEST(CeilfTest, InFloatRange) {
+TEST(LlvmLibcCeilfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/ceill_test.cpp b/libc/test/src/math/ceill_test.cpp
index 89ff9542bec1..96d2c583e436 100644
--- a/libc/test/src/math/ceill_test.cpp
+++ b/libc/test/src/math/ceill_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(CeillTest, SpecialNumbers) {
+TEST(LlvmLibcCeillTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::ceill(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::ceill(negZero));
@@ -29,7 +29,7 @@ TEST(CeillTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::ceill(aNaN));
}
-TEST(CeillTest, RoundedNumbers) {
+TEST(LlvmLibcCeillTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(1.0l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::ceill(-1.0l));
EXPECT_FP_EQ(10.0l, __llvm_libc::ceill(10.0l));
@@ -38,7 +38,7 @@ TEST(CeillTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::ceill(-1234.0l));
}
-TEST(CeillTest, Fractions) {
+TEST(LlvmLibcCeillTest, Fractions) {
EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(0.5l));
EXPECT_FP_EQ(-0.0l, __llvm_libc::ceill(-0.5l));
EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(0.115l));
@@ -61,7 +61,7 @@ TEST(CeillTest, Fractions) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::ceill(-1234.96l));
}
-TEST(CeillTest, InLongDoubleRange) {
+TEST(LlvmLibcCeillTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/copysign_test.cpp b/libc/test/src/math/copysign_test.cpp
index 7ab7ccfdb700..b7ee5178a7fa 100644
--- a/libc/test/src/math/copysign_test.cpp
+++ b/libc/test/src/math/copysign_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<double>;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(CopySignTest, SpecialNumbers) {
+TEST(LlvmLibcCopySignTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::copysign(aNaN, -1.0));
EXPECT_FP_EQ(aNaN, __llvm_libc::copysign(aNaN, 1.0));
@@ -27,7 +27,7 @@ TEST(CopySignTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::copysign(negZero, 1.0));
}
-TEST(CopySignTest, InDoubleRange) {
+TEST(LlvmLibcCopySignTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/copysignf_test.cpp b/libc/test/src/math/copysignf_test.cpp
index 72082cac8d43..6ad29a68b206 100644
--- a/libc/test/src/math/copysignf_test.cpp
+++ b/libc/test/src/math/copysignf_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<float>;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(CopySinfTest, SpecialNumbers) {
+TEST(LlvmLibcCopySinfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::copysignf(aNaN, -1.0));
EXPECT_FP_EQ(aNaN, __llvm_libc::copysignf(aNaN, 1.0));
@@ -27,7 +27,7 @@ TEST(CopySinfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::copysignf(negZero, 1.0));
}
-TEST(CopySinfTest, InFloatRange) {
+TEST(LlvmLibcCopySinfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/copysignl_test.cpp b/libc/test/src/math/copysignl_test.cpp
index 69daa038d991..89deff6d5732 100644
--- a/libc/test/src/math/copysignl_test.cpp
+++ b/libc/test/src/math/copysignl_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<long double>;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(CopySinlTest, SpecialNumbers) {
+TEST(LlvmLibcCopySinlTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::copysignl(aNaN, -1.0));
EXPECT_FP_EQ(aNaN, __llvm_libc::copysignl(aNaN, 1.0));
@@ -27,7 +27,7 @@ TEST(CopySinlTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::copysignl(negZero, 1.0));
}
-TEST(CopySinlTest, InLongDoubleRange) {
+TEST(LlvmLibcCopySinlTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/cosf_test.cpp b/libc/test/src/math/cosf_test.cpp
index 7e7d8df930e0..aee277672805 100644
--- a/libc/test/src/math/cosf_test.cpp
+++ b/libc/test/src/math/cosf_test.cpp
@@ -32,7 +32,7 @@ using __llvm_libc::testing::sdcomp26094Values;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(CosfTest, SpecialNumbers) {
+TEST(LlvmLibcCosfTest, SpecialNumbers) {
llvmlibc_errno = 0;
EXPECT_TRUE(
@@ -69,7 +69,7 @@ TEST(CosfTest, SpecialNumbers) {
EXPECT_EQ(llvmlibc_errno, EDOM);
}
-TEST(CosfTest, InFloatRange) {
+TEST(LlvmLibcCosfTest, InFloatRange) {
constexpr uint32_t count = 1000000;
constexpr uint32_t step = UINT32_MAX / count;
for (uint32_t i = 0, v = 0; i <= count; ++i, v += step) {
@@ -81,7 +81,7 @@ TEST(CosfTest, InFloatRange) {
}
// For small values, cos(x) is 1.
-TEST(CosfTest, SmallValues) {
+TEST(LlvmLibcCosfTest, SmallValues) {
float x = valueFromBits(0x17800000U);
float result = __llvm_libc::cosf(x);
EXPECT_MPFR_MATCH(mpfr::Operation::Cos, x, result, 1.0);
@@ -95,7 +95,7 @@ TEST(CosfTest, SmallValues) {
// SDCOMP-26094: check cosf in the cases for which the range reducer
// returns values furthest beyond its nominal upper bound of pi/4.
-TEST(CosfTest, SDCOMP_26094) {
+TEST(LlvmLibcCosfTest, SDCOMP_26094) {
for (uint32_t v : sdcomp26094Values) {
float x = valueFromBits(v);
ASSERT_MPFR_MATCH(mpfr::Operation::Cos, x, __llvm_libc::cosf(x), 1.0);
diff --git a/libc/test/src/math/exp2f_test.cpp b/libc/test/src/math/exp2f_test.cpp
index c7480c390699..96fe48f7368b 100644
--- a/libc/test/src/math/exp2f_test.cpp
+++ b/libc/test/src/math/exp2f_test.cpp
@@ -28,7 +28,7 @@ using BitPatterns = __llvm_libc::fputil::BitPatterns<float>;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(exp2fTest, SpecialNumbers) {
+TEST(LlvmLibcexp2fTest, SpecialNumbers) {
llvmlibc_errno = 0;
EXPECT_TRUE(
@@ -64,7 +64,7 @@ TEST(exp2fTest, SpecialNumbers) {
EXPECT_EQ(llvmlibc_errno, 0);
}
-TEST(ExpfTest, Overflow) {
+TEST(LlvmLibcExpfTest, Overflow) {
llvmlibc_errno = 0;
EXPECT_EQ(BitPatterns::inf,
valueAsBits(__llvm_libc::exp2f(valueFromBits(0x7f7fffffU))));
@@ -83,7 +83,7 @@ TEST(ExpfTest, Overflow) {
// Test with inputs which are the borders of underflow/overflow but still
// produce valid results without setting errno.
-TEST(ExpfTest, Borderline) {
+TEST(LlvmLibcExpfTest, Borderline) {
float x;
llvmlibc_errno = 0;
@@ -112,7 +112,7 @@ TEST(ExpfTest, Borderline) {
EXPECT_EQ(llvmlibc_errno, 0);
}
-TEST(ExpfTest, Underflow) {
+TEST(LlvmLibcExpfTest, Underflow) {
llvmlibc_errno = 0;
EXPECT_EQ(BitPatterns::zero,
valueAsBits(__llvm_libc::exp2f(valueFromBits(0xff7fffffU))));
@@ -129,7 +129,7 @@ TEST(ExpfTest, Underflow) {
EXPECT_EQ(llvmlibc_errno, ERANGE);
}
-TEST(exp2fTest, InFloatRange) {
+TEST(LlvmLibcexp2fTest, InFloatRange) {
constexpr uint32_t count = 1000000;
constexpr uint32_t step = UINT32_MAX / count;
for (uint32_t i = 0, v = 0; i <= count; ++i, v += step) {
diff --git a/libc/test/src/math/expf_test.cpp b/libc/test/src/math/expf_test.cpp
index 1243186e94a6..bc0c7804f7ef 100644
--- a/libc/test/src/math/expf_test.cpp
+++ b/libc/test/src/math/expf_test.cpp
@@ -28,7 +28,7 @@ using BitPatterns = __llvm_libc::fputil::BitPatterns<float>;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(ExpfTest, SpecialNumbers) {
+TEST(LlvmLibcExpfTest, SpecialNumbers) {
llvmlibc_errno = 0;
EXPECT_TRUE(
@@ -64,7 +64,7 @@ TEST(ExpfTest, SpecialNumbers) {
EXPECT_EQ(llvmlibc_errno, 0);
}
-TEST(ExpfTest, Overflow) {
+TEST(LlvmLibcExpfTest, Overflow) {
llvmlibc_errno = 0;
EXPECT_EQ(BitPatterns::inf,
valueAsBits(__llvm_libc::expf(valueFromBits(0x7f7fffffU))));
@@ -81,7 +81,7 @@ TEST(ExpfTest, Overflow) {
EXPECT_EQ(llvmlibc_errno, ERANGE);
}
-TEST(ExpfTest, Underflow) {
+TEST(LlvmLibcExpfTest, Underflow) {
llvmlibc_errno = 0;
EXPECT_EQ(BitPatterns::zero,
valueAsBits(__llvm_libc::expf(valueFromBits(0xff7fffffU))));
@@ -100,7 +100,7 @@ TEST(ExpfTest, Underflow) {
// Test with inputs which are the borders of underflow/overflow but still
// produce valid results without setting errno.
-TEST(ExpfTest, Borderline) {
+TEST(LlvmLibcExpfTest, Borderline) {
float x;
llvmlibc_errno = 0;
@@ -121,7 +121,7 @@ TEST(ExpfTest, Borderline) {
EXPECT_EQ(llvmlibc_errno, 0);
}
-TEST(ExpfTest, InFloatRange) {
+TEST(LlvmLibcExpfTest, InFloatRange) {
constexpr uint32_t count = 1000000;
constexpr uint32_t step = UINT32_MAX / count;
for (uint32_t i = 0, v = 0; i <= count; ++i, v += step) {
diff --git a/libc/test/src/math/fabs_test.cpp b/libc/test/src/math/fabs_test.cpp
index 91d37e3f569b..0e7390bf16d4 100644
--- a/libc/test/src/math/fabs_test.cpp
+++ b/libc/test/src/math/fabs_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(double)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FabsTest, SpecialNumbers) {
+TEST(LlvmLibcFabsTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fabs(aNaN));
EXPECT_FP_EQ(inf, __llvm_libc::fabs(inf));
@@ -29,7 +29,7 @@ TEST(FabsTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::fabs(negZero));
}
-TEST(FabsTest, InDoubleRange) {
+TEST(LlvmLibcFabsTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fabsf_test.cpp b/libc/test/src/math/fabsf_test.cpp
index fc0925901fa5..9a67adee2b96 100644
--- a/libc/test/src/math/fabsf_test.cpp
+++ b/libc/test/src/math/fabsf_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(float)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FabsfTest, SpecialNumbers) {
+TEST(LlvmLibcFabsfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fabsf(aNaN));
EXPECT_FP_EQ(inf, __llvm_libc::fabsf(inf));
@@ -29,7 +29,7 @@ TEST(FabsfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::fabsf(negZero));
}
-TEST(FabsfTest, InFloatRange) {
+TEST(LlvmLibcFabsfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fabsl_test.cpp b/libc/test/src/math/fabsl_test.cpp
index 1a0cb9d93be5..b51cf92249e4 100644
--- a/libc/test/src/math/fabsl_test.cpp
+++ b/libc/test/src/math/fabsl_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(long double)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FabslTest, SpecialNumbers) {
+TEST(LlvmLibcFabslTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fabsl(aNaN));
EXPECT_FP_EQ(inf, __llvm_libc::fabsl(inf));
@@ -29,7 +29,7 @@ TEST(FabslTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::fabsl(negZero));
}
-TEST(FabslTest, InLongDoubleRange) {
+TEST(LlvmLibcFabslTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fdim_test.cpp b/libc/test/src/math/fdim_test.cpp
index 35466640e945..8e086e21cbd9 100644
--- a/libc/test/src/math/fdim_test.cpp
+++ b/libc/test/src/math/fdim_test.cpp
@@ -14,14 +14,16 @@
#include "utils/UnitTest/Test.h"
#include <math.h>
-using FDimTest = FDimTestTemplate<double>;
+using LlvmLibcFDimTest = FDimTestTemplate<double>;
-TEST_F(FDimTest, NaNArg_fdim) { testNaNArg(&__llvm_libc::fdim); }
+TEST_F(LlvmLibcFDimTest, NaNArg_fdim) { testNaNArg(&__llvm_libc::fdim); }
-TEST_F(FDimTest, InfArg_fdim) { testInfArg(&__llvm_libc::fdim); }
+TEST_F(LlvmLibcFDimTest, InfArg_fdim) { testInfArg(&__llvm_libc::fdim); }
-TEST_F(FDimTest, NegInfArg_fdim) { testNegInfArg(&__llvm_libc::fdim); }
+TEST_F(LlvmLibcFDimTest, NegInfArg_fdim) { testNegInfArg(&__llvm_libc::fdim); }
-TEST_F(FDimTest, BothZero_fdim) { testBothZero(&__llvm_libc::fdim); }
+TEST_F(LlvmLibcFDimTest, BothZero_fdim) { testBothZero(&__llvm_libc::fdim); }
-TEST_F(FDimTest, InDoubleRange_fdim) { testInRange(&__llvm_libc::fdim); }
+TEST_F(LlvmLibcFDimTest, InDoubleRange_fdim) {
+ testInRange(&__llvm_libc::fdim);
+}
diff --git a/libc/test/src/math/fdimf_test.cpp b/libc/test/src/math/fdimf_test.cpp
index f2647e01e150..c5a7b681980d 100644
--- a/libc/test/src/math/fdimf_test.cpp
+++ b/libc/test/src/math/fdimf_test.cpp
@@ -14,14 +14,18 @@
#include "utils/UnitTest/Test.h"
#include <math.h>
-using FDimTest = FDimTestTemplate<float>;
+using LlvmLibcFDimTest = FDimTestTemplate<float>;
-TEST_F(FDimTest, NaNArg_fdimf) { testNaNArg(&__llvm_libc::fdimf); }
+TEST_F(LlvmLibcFDimTest, NaNArg_fdimf) { testNaNArg(&__llvm_libc::fdimf); }
-TEST_F(FDimTest, InfArg_fdimf) { testInfArg(&__llvm_libc::fdimf); }
+TEST_F(LlvmLibcFDimTest, InfArg_fdimf) { testInfArg(&__llvm_libc::fdimf); }
-TEST_F(FDimTest, NegInfArg_fdimf) { testNegInfArg(&__llvm_libc::fdimf); }
+TEST_F(LlvmLibcFDimTest, NegInfArg_fdimf) {
+ testNegInfArg(&__llvm_libc::fdimf);
+}
-TEST_F(FDimTest, BothZero_fdimf) { testBothZero(&__llvm_libc::fdimf); }
+TEST_F(LlvmLibcFDimTest, BothZero_fdimf) { testBothZero(&__llvm_libc::fdimf); }
-TEST_F(FDimTest, InFloatRange_fdimf) { testInRange(&__llvm_libc::fdimf); }
+TEST_F(LlvmLibcFDimTest, InFloatRange_fdimf) {
+ testInRange(&__llvm_libc::fdimf);
+}
diff --git a/libc/test/src/math/fdiml_test.cpp b/libc/test/src/math/fdiml_test.cpp
index 8e19a77990da..3c68ebbc3e63 100644
--- a/libc/test/src/math/fdiml_test.cpp
+++ b/libc/test/src/math/fdiml_test.cpp
@@ -14,14 +14,18 @@
#include "utils/UnitTest/Test.h"
#include <math.h>
-using FDimTest = FDimTestTemplate<long double>;
+using LlvmLibcFDimTest = FDimTestTemplate<long double>;
-TEST_F(FDimTest, NaNArg_fdiml) { testNaNArg(&__llvm_libc::fdiml); }
+TEST_F(LlvmLibcFDimTest, NaNArg_fdiml) { testNaNArg(&__llvm_libc::fdiml); }
-TEST_F(FDimTest, InfArg_fdiml) { testInfArg(&__llvm_libc::fdiml); }
+TEST_F(LlvmLibcFDimTest, InfArg_fdiml) { testInfArg(&__llvm_libc::fdiml); }
-TEST_F(FDimTest, NegInfArg_fdiml) { testNegInfArg(&__llvm_libc::fdiml); }
+TEST_F(LlvmLibcFDimTest, NegInfArg_fdiml) {
+ testNegInfArg(&__llvm_libc::fdiml);
+}
-TEST_F(FDimTest, BothZero_fdiml) { testBothZero(&__llvm_libc::fdiml); }
+TEST_F(LlvmLibcFDimTest, BothZero_fdiml) { testBothZero(&__llvm_libc::fdiml); }
-TEST_F(FDimTest, InLongDoubleRange_fdiml) { testInRange(&__llvm_libc::fdiml); }
+TEST_F(LlvmLibcFDimTest, InLongDoubleRange_fdiml) {
+ testInRange(&__llvm_libc::fdiml);
+}
diff --git a/libc/test/src/math/floor_test.cpp b/libc/test/src/math/floor_test.cpp
index 5421bb00dfaa..cd3b170943a1 100644
--- a/libc/test/src/math/floor_test.cpp
+++ b/libc/test/src/math/floor_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(double)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FloorTest, SpecialNumbers) {
+TEST(LlvmLibcFloorTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::floor(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::floor(negZero));
@@ -29,7 +29,7 @@ TEST(FloorTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::floor(aNaN));
}
-TEST(FloorTest, RoundedNumbers) {
+TEST(LlvmLibcFloorTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0, __llvm_libc::floor(1.0));
EXPECT_FP_EQ(-1.0, __llvm_libc::floor(-1.0));
EXPECT_FP_EQ(10.0, __llvm_libc::floor(10.0));
@@ -38,7 +38,7 @@ TEST(FloorTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::floor(-1234.0));
}
-TEST(FloorTest, Fractions) {
+TEST(LlvmLibcFloorTest, Fractions) {
EXPECT_FP_EQ(0.0, __llvm_libc::floor(0.5));
EXPECT_FP_EQ(-1.0, __llvm_libc::floor(-0.5));
EXPECT_FP_EQ(0.0, __llvm_libc::floor(0.115));
@@ -61,7 +61,7 @@ TEST(FloorTest, Fractions) {
EXPECT_FP_EQ(-1235.0, __llvm_libc::floor(-1234.96));
}
-TEST(FloorTest, InDoubleRange) {
+TEST(LlvmLibcFloorTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/floorf_test.cpp b/libc/test/src/math/floorf_test.cpp
index f545de2941ba..9ca71d457d8b 100644
--- a/libc/test/src/math/floorf_test.cpp
+++ b/libc/test/src/math/floorf_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(float)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FloorfTest, SpecialNumbers) {
+TEST(LlvmLibcFloorfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::floorf(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::floorf(negZero));
@@ -29,7 +29,7 @@ TEST(FloorfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::floorf(aNaN));
}
-TEST(FloorfTest, RoundedNumbers) {
+TEST(LlvmLibcFloorfTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0f, __llvm_libc::floorf(1.0f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::floorf(-1.0f));
EXPECT_FP_EQ(10.0f, __llvm_libc::floorf(10.0f));
@@ -38,7 +38,7 @@ TEST(FloorfTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::floorf(-1234.0f));
}
-TEST(FloorfTest, Fractions) {
+TEST(LlvmLibcFloorfTest, Fractions) {
EXPECT_FP_EQ(0.0f, __llvm_libc::floorf(0.5f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::floorf(-0.5f));
EXPECT_FP_EQ(0.0f, __llvm_libc::floorf(0.115f));
@@ -61,7 +61,7 @@ TEST(FloorfTest, Fractions) {
EXPECT_FP_EQ(-1235.0f, __llvm_libc::floorf(-1234.96f));
}
-TEST(FloorfTest, InFloatRange) {
+TEST(LlvmLibcFloorfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/floorl_test.cpp b/libc/test/src/math/floorl_test.cpp
index 16f630967f76..6bf935335ee1 100644
--- a/libc/test/src/math/floorl_test.cpp
+++ b/libc/test/src/math/floorl_test.cpp
@@ -19,7 +19,7 @@ DECLARE_SPECIAL_CONSTANTS(long double)
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FloorlTest, SpecialNumbers) {
+TEST(LlvmLibcFloorlTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::floorl(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::floorl(negZero));
@@ -29,7 +29,7 @@ TEST(FloorlTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::floorl(aNaN));
}
-TEST(FloorlTest, RoundedNumbers) {
+TEST(LlvmLibcFloorlTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0l, __llvm_libc::floorl(1.0l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::floorl(-1.0l));
EXPECT_FP_EQ(10.0l, __llvm_libc::floorl(10.0l));
@@ -38,7 +38,7 @@ TEST(FloorlTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::floorl(-1234.0l));
}
-TEST(FloorlTest, Fractions) {
+TEST(LlvmLibcFloorlTest, Fractions) {
EXPECT_FP_EQ(0.0l, __llvm_libc::floorl(0.5l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::floorl(-0.5l));
EXPECT_FP_EQ(0.0l, __llvm_libc::floorl(0.115l));
@@ -61,7 +61,7 @@ TEST(FloorlTest, Fractions) {
EXPECT_FP_EQ(-1235.0l, __llvm_libc::floorl(-1234.96l));
}
-TEST(FloorlTest, InLongDoubleRange) {
+TEST(LlvmLibcFloorlTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fmaf_test.cpp b/libc/test/src/math/fmaf_test.cpp
index 96d3ca7cf113..7db666b622bc 100644
--- a/libc/test/src/math/fmaf_test.cpp
+++ b/libc/test/src/math/fmaf_test.cpp
@@ -12,8 +12,12 @@
using FmaTest = FmaTestTemplate<float>;
-TEST_F(FmaTest, SpecialNumbers) { testSpecialNumbers(&__llvm_libc::fmaf); }
+TEST_F(LlvmLibcFmaTest, SpecialNumbers) {
+ testSpecialNumbers(&__llvm_libc::fmaf);
+}
-TEST_F(FmaTest, SubnormalRange) { testSubnormalRange(&__llvm_libc::fmaf); }
+TEST_F(LlvmLibcFmaTest, SubnormalRange) {
+ testSubnormalRange(&__llvm_libc::fmaf);
+}
-TEST_F(FmaTest, NormalRange) { testNormalRange(&__llvm_libc::fmaf); }
+TEST_F(LlvmLibcFmaTest, NormalRange) { testNormalRange(&__llvm_libc::fmaf); }
diff --git a/libc/test/src/math/fmax_test.cpp b/libc/test/src/math/fmax_test.cpp
index 4be7e0208dc7..843f073dbf02 100644
--- a/libc/test/src/math/fmax_test.cpp
+++ b/libc/test/src/math/fmax_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<double>;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(FmaxTest, NaNArg) {
+TEST(LlvmLibcFmaxTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmax(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fmax(negInf, aNaN));
EXPECT_FP_EQ(0.0, __llvm_libc::fmax(aNaN, 0.0));
@@ -26,7 +26,7 @@ TEST(FmaxTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fmax(aNaN, aNaN));
}
-TEST(FmaxTest, InfArg) {
+TEST(LlvmLibcFmaxTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmax(negInf, inf));
EXPECT_FP_EQ(inf, __llvm_libc::fmax(inf, 0.0));
EXPECT_FP_EQ(inf, __llvm_libc::fmax(-0.0, inf));
@@ -34,7 +34,7 @@ TEST(FmaxTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmax(-1.2345, inf));
}
-TEST(FmaxTest, NegInfArg) {
+TEST(LlvmLibcFmaxTest, NegInfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmax(inf, negInf));
EXPECT_FP_EQ(0.0, __llvm_libc::fmax(negInf, 0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmax(-0.0, negInf));
@@ -42,14 +42,14 @@ TEST(FmaxTest, NegInfArg) {
EXPECT_FP_EQ(1.2345, __llvm_libc::fmax(1.2345, negInf));
}
-TEST(FmaxTest, BothZero) {
+TEST(LlvmLibcFmaxTest, BothZero) {
EXPECT_FP_EQ(0.0, __llvm_libc::fmax(0.0, 0.0));
EXPECT_FP_EQ(0.0, __llvm_libc::fmax(-0.0, 0.0));
EXPECT_FP_EQ(0.0, __llvm_libc::fmax(0.0, -0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmax(-0.0, -0.0));
}
-TEST(FmaxTest, InDoubleRange) {
+TEST(LlvmLibcFmaxTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000001;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fmaxf_test.cpp b/libc/test/src/math/fmaxf_test.cpp
index 812dd4c8e5af..70d9e70e5441 100644
--- a/libc/test/src/math/fmaxf_test.cpp
+++ b/libc/test/src/math/fmaxf_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<float>;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(FmaxfTest, NaNArg) {
+TEST(LlvmLibcFmaxfTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fmaxf(negInf, aNaN));
EXPECT_FP_EQ(0.0f, __llvm_libc::fmaxf(aNaN, 0.0f));
@@ -26,7 +26,7 @@ TEST(FmaxfTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fmaxf(aNaN, aNaN));
}
-TEST(FmaxfTest, InfArg) {
+TEST(LlvmLibcFmaxfTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(negInf, inf));
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(inf, 0.0f));
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(-0.0f, inf));
@@ -34,7 +34,7 @@ TEST(FmaxfTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(-1.2345f, inf));
}
-TEST(FmaxfTest, NegInfArg) {
+TEST(LlvmLibcFmaxfTest, NegInfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxf(inf, negInf));
EXPECT_FP_EQ(0.0f, __llvm_libc::fmaxf(negInf, 0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fmaxf(-0.0f, negInf));
@@ -42,14 +42,14 @@ TEST(FmaxfTest, NegInfArg) {
EXPECT_FP_EQ(1.2345f, __llvm_libc::fmaxf(1.2345f, negInf));
}
-TEST(FmaxfTest, BothZero) {
+TEST(LlvmLibcFmaxfTest, BothZero) {
EXPECT_FP_EQ(0.0f, __llvm_libc::fmaxf(0.0f, 0.0f));
EXPECT_FP_EQ(0.0f, __llvm_libc::fmaxf(-0.0f, 0.0f));
EXPECT_FP_EQ(0.0f, __llvm_libc::fmaxf(0.0f, -0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fmaxf(-0.0f, -0.0f));
}
-TEST(FmaxfTest, InFloatRange) {
+TEST(LlvmLibcFmaxfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000001;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fmaxl_test.cpp b/libc/test/src/math/fmaxl_test.cpp
index 6eac0095c62a..8a17c1926744 100644
--- a/libc/test/src/math/fmaxl_test.cpp
+++ b/libc/test/src/math/fmaxl_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<long double>;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(FmaxlTest, NaNArg) {
+TEST(LlvmLibcFmaxlTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fmaxl(negInf, aNaN));
EXPECT_FP_EQ(0.0L, __llvm_libc::fmaxl(aNaN, 0.0L));
@@ -26,7 +26,7 @@ TEST(FmaxlTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fmaxl(aNaN, aNaN));
}
-TEST(FmaxlTest, InfArg) {
+TEST(LlvmLibcFmaxlTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(negInf, inf));
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(inf, 0.0L));
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(-0.0L, inf));
@@ -34,7 +34,7 @@ TEST(FmaxlTest, InfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(-1.2345L, inf));
}
-TEST(FmaxlTest, NegInfArg) {
+TEST(LlvmLibcFmaxlTest, NegInfArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmaxl(inf, negInf));
EXPECT_FP_EQ(0.0L, __llvm_libc::fmaxl(negInf, 0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fmaxl(-0.0L, negInf));
@@ -42,14 +42,14 @@ TEST(FmaxlTest, NegInfArg) {
EXPECT_FP_EQ(1.2345L, __llvm_libc::fmaxl(1.2345L, negInf));
}
-TEST(FmaxlTest, BothZero) {
+TEST(LlvmLibcFmaxlTest, BothZero) {
EXPECT_FP_EQ(0.0L, __llvm_libc::fmaxl(0.0L, 0.0L));
EXPECT_FP_EQ(0.0L, __llvm_libc::fmaxl(-0.0L, 0.0L));
EXPECT_FP_EQ(0.0L, __llvm_libc::fmaxl(0.0L, -0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fmaxl(-0.0L, -0.0L));
}
-TEST(FmaxlTest, InLongDoubleRange) {
+TEST(LlvmLibcFmaxlTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000001;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fmin_test.cpp b/libc/test/src/math/fmin_test.cpp
index 6782e8cb9e80..ef80d49c11af 100644
--- a/libc/test/src/math/fmin_test.cpp
+++ b/libc/test/src/math/fmin_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<double>;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(FminTest, NaNArg) {
+TEST(LlvmLibcFminTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fmin(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(negInf, aNaN));
EXPECT_FP_EQ(0.0, __llvm_libc::fmin(aNaN, 0.0));
@@ -26,7 +26,7 @@ TEST(FminTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fmin(aNaN, aNaN));
}
-TEST(FminTest, InfArg) {
+TEST(LlvmLibcFminTest, InfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(negInf, inf));
EXPECT_FP_EQ(0.0, __llvm_libc::fmin(inf, 0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmin(-0.0, inf));
@@ -34,7 +34,7 @@ TEST(FminTest, InfArg) {
EXPECT_FP_EQ(-1.2345, __llvm_libc::fmin(-1.2345, inf));
}
-TEST(FminTest, NegInfArg) {
+TEST(LlvmLibcFminTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(inf, negInf));
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(negInf, 0.0));
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(-0.0, negInf));
@@ -42,14 +42,14 @@ TEST(FminTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fmin(1.2345, negInf));
}
-TEST(FminTest, BothZero) {
+TEST(LlvmLibcFminTest, BothZero) {
EXPECT_FP_EQ(0.0, __llvm_libc::fmin(0.0, 0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmin(-0.0, 0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmin(0.0, -0.0));
EXPECT_FP_EQ(-0.0, __llvm_libc::fmin(-0.0, -0.0));
}
-TEST(FminTest, InFloatRange) {
+TEST(LlvmLibcFminTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fminf_test.cpp b/libc/test/src/math/fminf_test.cpp
index f7c16e57702b..25daf6cc55ce 100644
--- a/libc/test/src/math/fminf_test.cpp
+++ b/libc/test/src/math/fminf_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<float>;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(FminfTest, NaNArg) {
+TEST(LlvmLibcFminfTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fminf(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(negInf, aNaN));
EXPECT_FP_EQ(0.0f, __llvm_libc::fminf(aNaN, 0.0f));
@@ -26,7 +26,7 @@ TEST(FminfTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fminf(aNaN, aNaN));
}
-TEST(FminfTest, InfArg) {
+TEST(LlvmLibcFminfTest, InfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(negInf, inf));
EXPECT_FP_EQ(0.0f, __llvm_libc::fminf(inf, 0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fminf(-0.0f, inf));
@@ -34,7 +34,7 @@ TEST(FminfTest, InfArg) {
EXPECT_FP_EQ(-1.2345f, __llvm_libc::fminf(-1.2345f, inf));
}
-TEST(FminfTest, NegInfArg) {
+TEST(LlvmLibcFminfTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(inf, negInf));
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(negInf, 0.0f));
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(-0.0f, negInf));
@@ -42,14 +42,14 @@ TEST(FminfTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminf(1.2345f, negInf));
}
-TEST(FminfTest, BothZero) {
+TEST(LlvmLibcFminfTest, BothZero) {
EXPECT_FP_EQ(0.0f, __llvm_libc::fminf(0.0f, 0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fminf(-0.0f, 0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fminf(0.0f, -0.0f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::fminf(-0.0f, -0.0f));
}
-TEST(FminfTest, InFloatRange) {
+TEST(LlvmLibcFminfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/fminl_test.cpp b/libc/test/src/math/fminl_test.cpp
index 289c3957e3c1..a618110eb739 100644
--- a/libc/test/src/math/fminl_test.cpp
+++ b/libc/test/src/math/fminl_test.cpp
@@ -16,7 +16,7 @@ using FPBits = __llvm_libc::fputil::FPBits<long double>;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(FminlTest, NaNArg) {
+TEST(LlvmLibcFminlTest, NaNArg) {
EXPECT_FP_EQ(inf, __llvm_libc::fminl(aNaN, inf));
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(negInf, aNaN));
EXPECT_FP_EQ(0.0L, __llvm_libc::fminl(aNaN, 0.0L));
@@ -26,7 +26,7 @@ TEST(FminlTest, NaNArg) {
EXPECT_FP_EQ(aNaN, __llvm_libc::fminl(aNaN, aNaN));
}
-TEST(FminlTest, InfArg) {
+TEST(LlvmLibcFminlTest, InfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(negInf, inf));
EXPECT_FP_EQ(0.0L, __llvm_libc::fminl(inf, 0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fminl(-0.0L, inf));
@@ -34,7 +34,7 @@ TEST(FminlTest, InfArg) {
EXPECT_FP_EQ(-1.2345L, __llvm_libc::fminl(-1.2345L, inf));
}
-TEST(FminlTest, NegInfArg) {
+TEST(LlvmLibcFminlTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(inf, negInf));
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(negInf, 0.0L));
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(-0.0L, negInf));
@@ -42,14 +42,14 @@ TEST(FminlTest, NegInfArg) {
EXPECT_FP_EQ(negInf, __llvm_libc::fminl(1.2345L, negInf));
}
-TEST(FminlTest, BothZero) {
+TEST(LlvmLibcFminlTest, BothZero) {
EXPECT_FP_EQ(0.0L, __llvm_libc::fminl(0.0L, 0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fminl(-0.0L, 0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fminl(0.0L, -0.0L));
EXPECT_FP_EQ(-0.0L, __llvm_libc::fminl(-0.0L, -0.0L));
}
-TEST(FminlTest, InLongDoubleRange) {
+TEST(LlvmLibcFminlTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/frexp_test.cpp b/libc/test/src/math/frexp_test.cpp
index ce118753cf85..d9fcae4042bb 100644
--- a/libc/test/src/math/frexp_test.cpp
+++ b/libc/test/src/math/frexp_test.cpp
@@ -26,7 +26,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
using BitPatterns = __llvm_libc::fputil::BitPatterns<double>;
using Properties = __llvm_libc::fputil::FloatProperties<double>;
-TEST(FrexpTest, SpecialNumbers) {
+TEST(LlvmLibcFrexpTest, SpecialNumbers) {
int exponent;
EXPECT_EQ(BitPatterns::aQuietNaN,
@@ -60,7 +60,7 @@ TEST(FrexpTest, SpecialNumbers) {
EXPECT_EQ(exponent, 0);
}
-TEST(FrexpTest, PowersOfTwo) {
+TEST(LlvmLibcFrexpTest, PowersOfTwo) {
int exponent;
EXPECT_EQ(valueAsBits(0.5), valueAsBits(__llvm_libc::frexp(1.0, &exponent)));
@@ -106,7 +106,7 @@ TEST(FrexpTest, PowersOfTwo) {
EXPECT_EQ(exponent, 7);
}
-TEST(FrexpTest, SomeIntegers) {
+TEST(LlvmLibcFrexpTest, SomeIntegers) {
int exponent;
EXPECT_EQ(valueAsBits(0.75),
@@ -131,7 +131,7 @@ TEST(FrexpTest, SomeIntegers) {
EXPECT_EQ(exponent, 10);
}
-TEST(FrexpTest, InDoubleRange) {
+TEST(LlvmLibcFrexpTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000001;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/frexpf_test.cpp b/libc/test/src/math/frexpf_test.cpp
index ba9fedad3b44..8d2fe307855d 100644
--- a/libc/test/src/math/frexpf_test.cpp
+++ b/libc/test/src/math/frexpf_test.cpp
@@ -26,7 +26,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
using BitPatterns = __llvm_libc::fputil::BitPatterns<float>;
using Properties = __llvm_libc::fputil::FloatProperties<float>;
-TEST(FrexpfTest, SpecialNumbers) {
+TEST(LlvmLibcFrexpfTest, SpecialNumbers) {
int exponent;
EXPECT_EQ(BitPatterns::aQuietNaN,
@@ -60,7 +60,7 @@ TEST(FrexpfTest, SpecialNumbers) {
EXPECT_EQ(exponent, 0);
}
-TEST(FrexpfTest, PowersOfTwo) {
+TEST(LlvmLibcFrexpfTest, PowersOfTwo) {
int exponent;
EXPECT_EQ(valueAsBits(0.5f),
@@ -113,7 +113,7 @@ TEST(FrexpfTest, PowersOfTwo) {
EXPECT_EQ(exponent, 7);
}
-TEST(FrexpfTest, SomeIntegers) {
+TEST(LlvmLibcFrexpfTest, SomeIntegers) {
int exponent;
EXPECT_EQ(valueAsBits(0.75f),
@@ -138,7 +138,7 @@ TEST(FrexpfTest, SomeIntegers) {
EXPECT_EQ(exponent, 10);
}
-TEST(FrexpfTest, InFloatRange) {
+TEST(LlvmLibcFrexpfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000001;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/frexpl_test.cpp b/libc/test/src/math/frexpl_test.cpp
index 34d3b1b47e0e..ee18961e638b 100644
--- a/libc/test/src/math/frexpl_test.cpp
+++ b/libc/test/src/math/frexpl_test.cpp
@@ -17,7 +17,7 @@ using FPBits = __llvm_libc::fputil::FPBits<long double>;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(FrexplTest, SpecialNumbers) {
+TEST(LlvmLibcFrexplTest, SpecialNumbers) {
int exponent;
EXPECT_TRUE(FPBits::inf() == __llvm_libc::frexpl(FPBits::inf(), &exponent));
@@ -35,7 +35,7 @@ TEST(FrexplTest, SpecialNumbers) {
FPBits(__llvm_libc::frexpl(FPBits::buildNaN(1), &exponent)).isNaN());
}
-TEST(FrexplTest, PowersOfTwo) {
+TEST(LlvmLibcFrexplTest, PowersOfTwo) {
int exponent;
EXPECT_TRUE(0.5l == __llvm_libc::frexpl(1.0l, &exponent));
@@ -69,7 +69,7 @@ TEST(FrexplTest, PowersOfTwo) {
EXPECT_EQ(exponent, 6);
}
-TEST(FrexplTest, SomeIntegers) {
+TEST(LlvmLibcFrexplTest, SomeIntegers) {
int exponent;
EXPECT_TRUE(0.75l == __llvm_libc::frexpl(24.0l, &exponent));
@@ -88,7 +88,7 @@ TEST(FrexplTest, SomeIntegers) {
EXPECT_EQ(exponent, 10);
}
-TEST(FrexplTest, LongDoubleRange) {
+TEST(LlvmLibcFrexplTest, LongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/hypot_test.cpp b/libc/test/src/math/hypot_test.cpp
index 0607dbdcb6eb..e8604ccc217e 100644
--- a/libc/test/src/math/hypot_test.cpp
+++ b/libc/test/src/math/hypot_test.cpp
@@ -12,8 +12,12 @@
using HypotTest = HypotTestTemplate<double>;
-TEST_F(HypotTest, SpecialNumbers) { testSpecialNumbers(&__llvm_libc::hypot); }
+TEST_F(LlvmLibcHypotTest, SpecialNumbers) {
+ testSpecialNumbers(&__llvm_libc::hypot);
+}
-TEST_F(HypotTest, SubnormalRange) { testSubnormalRange(&__llvm_libc::hypot); }
+TEST_F(LlvmLibcHypotTest, SubnormalRange) {
+ testSubnormalRange(&__llvm_libc::hypot);
+}
-TEST_F(HypotTest, NormalRange) { testNormalRange(&__llvm_libc::hypot); }
+TEST_F(LlvmLibcHypotTest, NormalRange) { testNormalRange(&__llvm_libc::hypot); }
diff --git a/libc/test/src/math/hypotf_test.cpp b/libc/test/src/math/hypotf_test.cpp
index 864e56602d27..ef4ef688ed87 100644
--- a/libc/test/src/math/hypotf_test.cpp
+++ b/libc/test/src/math/hypotf_test.cpp
@@ -12,8 +12,14 @@
using HypotfTest = HypotTestTemplate<float>;
-TEST_F(HypotfTest, SpecialNumbers) { testSpecialNumbers(&__llvm_libc::hypotf); }
+TEST_F(LlvmLibcHypotfTest, SpecialNumbers) {
+ testSpecialNumbers(&__llvm_libc::hypotf);
+}
-TEST_F(HypotfTest, SubnormalRange) { testSubnormalRange(&__llvm_libc::hypotf); }
+TEST_F(LlvmLibcHypotfTest, SubnormalRange) {
+ testSubnormalRange(&__llvm_libc::hypotf);
+}
-TEST_F(HypotfTest, NormalRange) { testNormalRange(&__llvm_libc::hypotf); }
+TEST_F(LlvmLibcHypotfTest, NormalRange) {
+ testNormalRange(&__llvm_libc::hypotf);
+}
diff --git a/libc/test/src/math/ilogb_test.cpp b/libc/test/src/math/ilogb_test.cpp
index 7fb3b70f8fb4..5c72fce0912c 100644
--- a/libc/test/src/math/ilogb_test.cpp
+++ b/libc/test/src/math/ilogb_test.cpp
@@ -15,22 +15,22 @@
#include "utils/UnitTest/Test.h"
#include <math.h>
-TEST_F(ILogbTest, SpecialNumbers_ilogb) {
+TEST_F(LlvmLibcILogbTest, SpecialNumbers_ilogb) {
testSpecialNumbers<double>(&__llvm_libc::ilogb);
}
-TEST_F(ILogbTest, PowersOfTwo_ilogb) {
+TEST_F(LlvmLibcILogbTest, PowersOfTwo_ilogb) {
testPowersOfTwo<double>(&__llvm_libc::ilogb);
}
-TEST_F(ILogbTest, SomeIntegers_ilogb) {
+TEST_F(LlvmLibcILogbTest, SomeIntegers_ilogb) {
testSomeIntegers<double>(&__llvm_libc::ilogb);
}
-TEST_F(ILogbTest, SubnormalRange_ilogb) {
+TEST_F(LlvmLibcILogbTest, SubnormalRange_ilogb) {
testSubnormalRange<double>(&__llvm_libc::ilogb);
}
-TEST_F(ILogbTest, NormalRange_ilogb) {
+TEST_F(LlvmLibcILogbTest, NormalRange_ilogb) {
testNormalRange<double>(&__llvm_libc::ilogb);
}
diff --git a/libc/test/src/math/ilogbf_test.cpp b/libc/test/src/math/ilogbf_test.cpp
index 5917a8ca8ea4..db88f1b705f1 100644
--- a/libc/test/src/math/ilogbf_test.cpp
+++ b/libc/test/src/math/ilogbf_test.cpp
@@ -15,22 +15,22 @@
#include "utils/UnitTest/Test.h"
#include <math.h>
-TEST_F(ILogbTest, SpecialNumbers_ilogbf) {
+TEST_F(LlvmLibcILogbTest, SpecialNumbers_ilogbf) {
testSpecialNumbers<float>(&__llvm_libc::ilogbf);
}
-TEST_F(ILogbTest, PowersOfTwo_ilogbf) {
+TEST_F(LlvmLibcILogbTest, PowersOfTwo_ilogbf) {
testPowersOfTwo<float>(&__llvm_libc::ilogbf);
}
-TEST_F(ILogbTest, SomeIntegers_ilogbf) {
+TEST_F(LlvmLibcILogbTest, SomeIntegers_ilogbf) {
testSomeIntegers<float>(&__llvm_libc::ilogbf);
}
-TEST_F(ILogbTest, SubnormalRange_ilogbf) {
+TEST_F(LlvmLibcILogbTest, SubnormalRange_ilogbf) {
testSubnormalRange<float>(&__llvm_libc::ilogbf);
}
-TEST_F(ILogbTest, NormalRange_ilogbf) {
+TEST_F(LlvmLibcILogbTest, NormalRange_ilogbf) {
testNormalRange<float>(&__llvm_libc::ilogbf);
}
diff --git a/libc/test/src/math/ilogbl_test.cpp b/libc/test/src/math/ilogbl_test.cpp
index 349c2a71ead9..b329ab204de4 100644
--- a/libc/test/src/math/ilogbl_test.cpp
+++ b/libc/test/src/math/ilogbl_test.cpp
@@ -17,22 +17,22 @@
using RunContext = __llvm_libc::testing::RunContext;
-TEST_F(ILogbTest, SpecialNumbers_ilogbl) {
+TEST_F(LlvmLibcILogbTest, SpecialNumbers_ilogbl) {
testSpecialNumbers<long double>(&__llvm_libc::ilogbl);
}
-TEST_F(ILogbTest, PowersOfTwo_ilogbl) {
+TEST_F(LlvmLibcILogbTest, PowersOfTwo_ilogbl) {
testPowersOfTwo<long double>(&__llvm_libc::ilogbl);
}
-TEST_F(ILogbTest, SomeIntegers_ilogbl) {
+TEST_F(LlvmLibcILogbTest, SomeIntegers_ilogbl) {
testSomeIntegers<long double>(&__llvm_libc::ilogbl);
}
-TEST_F(ILogbTest, SubnormalRange_ilogbl) {
+TEST_F(LlvmLibcILogbTest, SubnormalRange_ilogbl) {
testSubnormalRange<long double>(&__llvm_libc::ilogbl);
}
-TEST_F(ILogbTest, NormalRange_ilogbl) {
+TEST_F(LlvmLibcILogbTest, NormalRange_ilogbl) {
testNormalRange<long double>(&__llvm_libc::ilogbl);
}
diff --git a/libc/test/src/math/logb_test.cpp b/libc/test/src/math/logb_test.cpp
index 0f9d4d07cdef..ca0f9eacde6f 100644
--- a/libc/test/src/math/logb_test.cpp
+++ b/libc/test/src/math/logb_test.cpp
@@ -20,7 +20,7 @@ using __llvm_libc::fputil::valueFromBits;
using BitPatterns = __llvm_libc::fputil::BitPatterns<double>;
using Properties = __llvm_libc::fputil::FloatProperties<double>;
-TEST(LogbTest, SpecialNumbers) {
+TEST(LlvmLibcLogbTest, SpecialNumbers) {
EXPECT_EQ(
BitPatterns::aQuietNaN,
valueAsBits(__llvm_libc::logb(valueFromBits(BitPatterns::aQuietNaN))));
@@ -46,7 +46,7 @@ TEST(LogbTest, SpecialNumbers) {
valueFromBits(BitPatterns::negZero))));
}
-TEST(LogbTest, PowersOfTwo) {
+TEST(LlvmLibcLogbTest, PowersOfTwo) {
EXPECT_EQ(valueAsBits(0.0), valueAsBits(__llvm_libc::logb(1.0)));
EXPECT_EQ(valueAsBits(0.0), valueAsBits(__llvm_libc::logb(-1.0)));
@@ -66,7 +66,7 @@ TEST(LogbTest, PowersOfTwo) {
EXPECT_EQ(valueAsBits(5.0), valueAsBits(__llvm_libc::logb(-32.0)));
}
-TEST(LogbTest, SomeIntegers) {
+TEST(LlvmLibcLogbTest, SomeIntegers) {
EXPECT_EQ(valueAsBits(1.0), valueAsBits(__llvm_libc::logb(3.0)));
EXPECT_EQ(valueAsBits(1.0), valueAsBits(__llvm_libc::logb(-3.0)));
@@ -83,7 +83,7 @@ TEST(LogbTest, SomeIntegers) {
EXPECT_EQ(valueAsBits(5.0), valueAsBits(__llvm_libc::logb(-55.0)));
}
-TEST(LogbTest, InDoubleRange) {
+TEST(LlvmLibcLogbTest, InDoubleRange) {
using BitsType = Properties::BitsType;
constexpr BitsType count = 10000000;
constexpr BitsType step = UINT64_MAX / count;
diff --git a/libc/test/src/math/logbf_test.cpp b/libc/test/src/math/logbf_test.cpp
index 41ffac5c7b9e..cc91cae7ec29 100644
--- a/libc/test/src/math/logbf_test.cpp
+++ b/libc/test/src/math/logbf_test.cpp
@@ -20,7 +20,7 @@ using __llvm_libc::fputil::valueFromBits;
using BitPatterns = __llvm_libc::fputil::BitPatterns<float>;
using Properties = __llvm_libc::fputil::FloatProperties<float>;
-TEST(LogbfTest, SpecialNumbers) {
+TEST(LlvmLibcLogbfTest, SpecialNumbers) {
EXPECT_EQ(
BitPatterns::aQuietNaN,
valueAsBits(__llvm_libc::logbf(valueFromBits(BitPatterns::aQuietNaN))));
@@ -46,7 +46,7 @@ TEST(LogbfTest, SpecialNumbers) {
valueFromBits(BitPatterns::negZero))));
}
-TEST(LogbfTest, PowersOfTwo) {
+TEST(LlvmLibcLogbfTest, PowersOfTwo) {
EXPECT_EQ(valueAsBits(0.0f), valueAsBits(__llvm_libc::logbf(1.0f)));
EXPECT_EQ(valueAsBits(0.0f), valueAsBits(__llvm_libc::logbf(-1.0f)));
@@ -66,7 +66,7 @@ TEST(LogbfTest, PowersOfTwo) {
EXPECT_EQ(valueAsBits(5.0f), valueAsBits(__llvm_libc::logbf(-32.0f)));
}
-TEST(LogbTest, SomeIntegers) {
+TEST(LlvmLibcLogbTest, SomeIntegers) {
EXPECT_EQ(valueAsBits(1.0f), valueAsBits(__llvm_libc::logbf(3.0f)));
EXPECT_EQ(valueAsBits(1.0f), valueAsBits(__llvm_libc::logbf(-3.0f)));
@@ -83,7 +83,7 @@ TEST(LogbTest, SomeIntegers) {
EXPECT_EQ(valueAsBits(5.0f), valueAsBits(__llvm_libc::logbf(-55.0f)));
}
-TEST(LogbfTest, InDoubleRange) {
+TEST(LlvmLibcLogbfTest, InDoubleRange) {
using BitsType = Properties::BitsType;
constexpr BitsType count = 10000000;
constexpr BitsType step = UINT32_MAX / count;
diff --git a/libc/test/src/math/logbl_test.cpp b/libc/test/src/math/logbl_test.cpp
index 4a12ec6a0f37..f0d5afe328c6 100644
--- a/libc/test/src/math/logbl_test.cpp
+++ b/libc/test/src/math/logbl_test.cpp
@@ -14,7 +14,7 @@
using FPBits = __llvm_libc::fputil::FPBits<long double>;
-TEST(logblTest, SpecialNumbers) {
+TEST(LlvmLibclogblTest, SpecialNumbers) {
EXPECT_TRUE(FPBits::inf() == __llvm_libc::logbl(FPBits::inf()));
EXPECT_TRUE(FPBits::inf() == __llvm_libc::logbl(FPBits::negInf()));
@@ -24,7 +24,7 @@ TEST(logblTest, SpecialNumbers) {
EXPECT_TRUE(FPBits(__llvm_libc::logbl(FPBits::buildNaN(1))).isNaN());
}
-TEST(logblTest, PowersOfTwo) {
+TEST(LlvmLibclogblTest, PowersOfTwo) {
EXPECT_TRUE(0.0l == __llvm_libc::logbl(1.0l));
EXPECT_TRUE(0.0l == __llvm_libc::logbl(-1.0l));
@@ -44,7 +44,7 @@ TEST(logblTest, PowersOfTwo) {
EXPECT_TRUE(5.0l == __llvm_libc::logbl(-32.0l));
}
-TEST(LogbTest, SomeIntegers) {
+TEST(LlvmLibcLogbTest, SomeIntegers) {
EXPECT_TRUE(1.0l == __llvm_libc::logbl(3.0l));
EXPECT_TRUE(1.0l == __llvm_libc::logbl(-3.0l));
@@ -61,7 +61,7 @@ TEST(LogbTest, SomeIntegers) {
EXPECT_TRUE(5.0l == __llvm_libc::logbl(-55.0l));
}
-TEST(LogblTest, LongDoubleRange) {
+TEST(LlvmLibcLogblTest, LongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/modf_test.cpp b/libc/test/src/math/modf_test.cpp
index e9d1572e9391..936cccad8a5f 100644
--- a/libc/test/src/math/modf_test.cpp
+++ b/libc/test/src/math/modf_test.cpp
@@ -21,7 +21,7 @@ using __llvm_libc::fputil::valueFromBits;
using BitPatterns = __llvm_libc::fputil::BitPatterns<double>;
using Properties = __llvm_libc::fputil::FloatProperties<double>;
-TEST(ModfTest, SpecialNumbers) {
+TEST(LlvmLibcModfTest, SpecialNumbers) {
double integral;
EXPECT_EQ(BitPatterns::aQuietNaN,
@@ -60,7 +60,7 @@ TEST(ModfTest, SpecialNumbers) {
EXPECT_EQ(valueAsBits(integral), BitPatterns::negZero);
}
-TEST(ModfTest, Integers) {
+TEST(LlvmLibcModfTest, Integers) {
double integral;
EXPECT_EQ(BitPatterns::zero, valueAsBits(__llvm_libc::modf(1.0, &integral)));
@@ -86,7 +86,7 @@ TEST(ModfTest, Integers) {
EXPECT_EQ(valueAsBits(integral), valueAsBits(-12345.0));
}
-TEST(ModfTest, Fractions) {
+TEST(LlvmLibcModfTest, Fractions) {
double integral;
EXPECT_EQ(valueAsBits(0.5), valueAsBits(__llvm_libc::modf(1.5, &integral)));
@@ -112,7 +112,7 @@ TEST(ModfTest, Fractions) {
EXPECT_EQ(valueAsBits(integral), valueAsBits(-100.0));
}
-TEST(ModfTest, InDoubleRange) {
+TEST(LlvmLibcModfTest, InDoubleRange) {
using BitsType = Properties::BitsType;
constexpr BitsType count = 10000000;
constexpr BitsType step = UINT64_MAX / count;
diff --git a/libc/test/src/math/modff_test.cpp b/libc/test/src/math/modff_test.cpp
index 2fd15f7df90d..ec91ef3d018b 100644
--- a/libc/test/src/math/modff_test.cpp
+++ b/libc/test/src/math/modff_test.cpp
@@ -21,7 +21,7 @@ using __llvm_libc::fputil::valueFromBits;
using BitPatterns = __llvm_libc::fputil::BitPatterns<float>;
using Properties = __llvm_libc::fputil::FloatProperties<float>;
-TEST(ModffTest, SpecialNumbers) {
+TEST(LlvmLibcModffTest, SpecialNumbers) {
float integral;
EXPECT_EQ(BitPatterns::aQuietNaN,
@@ -60,7 +60,7 @@ TEST(ModffTest, SpecialNumbers) {
EXPECT_EQ(valueAsBits(integral), BitPatterns::negZero);
}
-TEST(ModffTest, Integers) {
+TEST(LlvmLibcModffTest, Integers) {
float integral;
EXPECT_EQ(BitPatterns::zero,
@@ -88,7 +88,7 @@ TEST(ModffTest, Integers) {
EXPECT_EQ(valueAsBits(integral), valueAsBits(-12345.0f));
}
-TEST(ModffTest, Fractions) {
+TEST(LlvmLibcModffTest, Fractions) {
float integral;
EXPECT_EQ(valueAsBits(0.5f),
@@ -116,7 +116,7 @@ TEST(ModffTest, Fractions) {
EXPECT_EQ(valueAsBits(integral), valueAsBits(-100.0f));
}
-TEST(ModffTest, InDoubleRange) {
+TEST(LlvmLibcModffTest, InDoubleRange) {
using BitsType = Properties::BitsType;
constexpr BitsType count = 10000000;
constexpr BitsType step = UINT32_MAX / count;
diff --git a/libc/test/src/math/modfl_test.cpp b/libc/test/src/math/modfl_test.cpp
index d20cb4f74139..e8f292abddbe 100644
--- a/libc/test/src/math/modfl_test.cpp
+++ b/libc/test/src/math/modfl_test.cpp
@@ -15,7 +15,7 @@
using FPBits = __llvm_libc::fputil::FPBits<long double>;
-TEST(modflTest, SpecialNumbers) {
+TEST(LlvmLibcmodflTest, SpecialNumbers) {
long double integral;
EXPECT_TRUE(FPBits::zero() == __llvm_libc::modfl(FPBits::inf(), &integral));
@@ -36,7 +36,7 @@ TEST(modflTest, SpecialNumbers) {
FPBits(__llvm_libc::modfl(FPBits::buildNaN(1), &integral)).isNaN());
}
-TEST(modflTest, Integers) {
+TEST(LlvmLibcmodflTest, Integers) {
long double integral;
EXPECT_TRUE(FPBits::zero() == __llvm_libc::modfl(1.0l, &integral));
@@ -58,7 +58,7 @@ TEST(modflTest, Integers) {
EXPECT_TRUE(integral == -12345.0l);
}
-TEST(ModfTest, Fractions) {
+TEST(LlvmLibcModfTest, Fractions) {
long double integral;
EXPECT_TRUE(0.5l == __llvm_libc::modfl(1.5l, &integral));
@@ -80,7 +80,7 @@ TEST(ModfTest, Fractions) {
EXPECT_TRUE(integral == -100.0l);
}
-TEST(ModflTest, LongDoubleRange) {
+TEST(LlvmLibcModflTest, LongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/round_test.cpp b/libc/test/src/math/round_test.cpp
index 4ab248a2349c..1662514178bf 100644
--- a/libc/test/src/math/round_test.cpp
+++ b/libc/test/src/math/round_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(RoundTest, SpecialNumbers) {
+TEST(LlvmLibcRoundTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::round(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::round(negZero));
@@ -29,7 +29,7 @@ TEST(RoundTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::round(aNaN));
}
-TEST(RoundTest, RoundedNumbers) {
+TEST(LlvmLibcRoundTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0, __llvm_libc::round(1.0));
EXPECT_FP_EQ(-1.0, __llvm_libc::round(-1.0));
EXPECT_FP_EQ(10.0, __llvm_libc::round(10.0));
@@ -38,7 +38,7 @@ TEST(RoundTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::round(-1234.0));
}
-TEST(RoundTest, Fractions) {
+TEST(LlvmLibcRoundTest, Fractions) {
EXPECT_FP_EQ(1.0, __llvm_libc::round(0.5));
EXPECT_FP_EQ(-1.0, __llvm_libc::round(-0.5));
EXPECT_FP_EQ(0.0, __llvm_libc::round(0.115));
@@ -61,7 +61,7 @@ TEST(RoundTest, Fractions) {
EXPECT_FP_EQ(-1235.0, __llvm_libc::round(-1234.96));
}
-TEST(RoundTest, InDoubleRange) {
+TEST(LlvmLibcRoundTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/roundf_test.cpp b/libc/test/src/math/roundf_test.cpp
index b08c7effcb1f..8a71072c80a8 100644
--- a/libc/test/src/math/roundf_test.cpp
+++ b/libc/test/src/math/roundf_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(RoundfTest, SpecialNumbers) {
+TEST(LlvmLibcRoundfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::roundf(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::roundf(negZero));
@@ -29,7 +29,7 @@ TEST(RoundfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::roundf(aNaN));
}
-TEST(RoundfTest, RoundedNumbers) {
+TEST(LlvmLibcRoundfTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0f, __llvm_libc::roundf(1.0f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::roundf(-1.0f));
EXPECT_FP_EQ(10.0f, __llvm_libc::roundf(10.0f));
@@ -38,7 +38,7 @@ TEST(RoundfTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::roundf(-1234.0f));
}
-TEST(RoundfTest, Fractions) {
+TEST(LlvmLibcRoundfTest, Fractions) {
EXPECT_FP_EQ(1.0f, __llvm_libc::roundf(0.5f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::roundf(-0.5f));
EXPECT_FP_EQ(0.0f, __llvm_libc::roundf(0.115f));
@@ -61,7 +61,7 @@ TEST(RoundfTest, Fractions) {
EXPECT_FP_EQ(-1235.0f, __llvm_libc::roundf(-1234.96f));
}
-TEST(RoundfTest, InFloatRange) {
+TEST(LlvmLibcRoundfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/roundl_test.cpp b/libc/test/src/math/roundl_test.cpp
index 18f36cb52091..83764eca94c1 100644
--- a/libc/test/src/math/roundl_test.cpp
+++ b/libc/test/src/math/roundl_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(RoundlTest, SpecialNumbers) {
+TEST(LlvmLibcRoundlTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::roundl(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::roundl(negZero));
@@ -29,7 +29,7 @@ TEST(RoundlTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::roundl(aNaN));
}
-TEST(RoundlTest, RoundedNumbers) {
+TEST(LlvmLibcRoundlTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0l, __llvm_libc::roundl(1.0l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::roundl(-1.0l));
EXPECT_FP_EQ(10.0l, __llvm_libc::roundl(10.0l));
@@ -38,7 +38,7 @@ TEST(RoundlTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::roundl(-1234.0l));
}
-TEST(RoundlTest, Fractions) {
+TEST(LlvmLibcRoundlTest, Fractions) {
EXPECT_FP_EQ(1.0l, __llvm_libc::roundl(0.5l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::roundl(-0.5l));
EXPECT_FP_EQ(0.0l, __llvm_libc::roundl(0.115l));
@@ -61,7 +61,7 @@ TEST(RoundlTest, Fractions) {
EXPECT_FP_EQ(-1235.0l, __llvm_libc::roundl(-1234.96l));
}
-TEST(RoundlTest, InLongDoubleRange) {
+TEST(LlvmLibcRoundlTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp
index 9a73dc74ae42..91e20d6b90e3 100644
--- a/libc/test/src/math/sincosf_test.cpp
+++ b/libc/test/src/math/sincosf_test.cpp
@@ -32,7 +32,7 @@ using __llvm_libc::testing::sdcomp26094Values;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(SinCosfTest, SpecialNumbers) {
+TEST(LlvmLibcSinCosfTest, SpecialNumbers) {
llvmlibc_errno = 0;
float sin, cos;
@@ -81,7 +81,7 @@ TEST(SinCosfTest, SpecialNumbers) {
EXPECT_EQ(llvmlibc_errno, EDOM);
}
-TEST(SinCosfTest, InFloatRange) {
+TEST(LlvmLibcSinCosfTest, InFloatRange) {
constexpr uint32_t count = 1000000;
constexpr uint32_t step = UINT32_MAX / count;
for (uint32_t i = 0, v = 0; i <= count; ++i, v += step) {
@@ -97,7 +97,7 @@ TEST(SinCosfTest, InFloatRange) {
}
// For small values, cos(x) is 1 and sin(x) is x.
-TEST(SinCosfTest, SmallValues) {
+TEST(LlvmLibcSinCosfTest, SmallValues) {
uint32_t bits = 0x17800000;
float x = valueFromBits(bits);
float result_cos, result_sin;
@@ -118,7 +118,7 @@ TEST(SinCosfTest, SmallValues) {
// SDCOMP-26094: check sinf in the cases for which the range reducer
// returns values furthest beyond its nominal upper bound of pi/4.
-TEST(SinCosfTest, SDCOMP_26094) {
+TEST(LlvmLibcSinCosfTest, SDCOMP_26094) {
for (uint32_t v : sdcomp26094Values) {
float x = valueFromBits(v);
float sin, cos;
diff --git a/libc/test/src/math/sinf_test.cpp b/libc/test/src/math/sinf_test.cpp
index 1ec5636e6db5..c87244eaece0 100644
--- a/libc/test/src/math/sinf_test.cpp
+++ b/libc/test/src/math/sinf_test.cpp
@@ -32,7 +32,7 @@ using __llvm_libc::testing::sdcomp26094Values;
namespace mpfr = __llvm_libc::testing::mpfr;
-TEST(SinfTest, SpecialNumbers) {
+TEST(LlvmLibcSinfTest, SpecialNumbers) {
llvmlibc_errno = 0;
EXPECT_TRUE(
@@ -69,7 +69,7 @@ TEST(SinfTest, SpecialNumbers) {
EXPECT_EQ(llvmlibc_errno, EDOM);
}
-TEST(SinfTest, InFloatRange) {
+TEST(LlvmLibcSinfTest, InFloatRange) {
constexpr uint32_t count = 1000000;
constexpr uint32_t step = UINT32_MAX / count;
for (uint32_t i = 0, v = 0; i <= count; ++i, v += step) {
@@ -80,13 +80,13 @@ TEST(SinfTest, InFloatRange) {
}
}
-TEST(SinfTest, SpecificBitPatterns) {
+TEST(LlvmLibcSinfTest, SpecificBitPatterns) {
float x = valueFromBits(0xc70d39a1);
EXPECT_MPFR_MATCH(mpfr::Operation::Sin, x, __llvm_libc::sinf(x), 1.0);
}
// For small values, sin(x) is x.
-TEST(SinfTest, SmallValues) {
+TEST(LlvmLibcSinfTest, SmallValues) {
uint32_t bits = 0x17800000;
float x = valueFromBits(bits);
float result = __llvm_libc::sinf(x);
@@ -102,7 +102,7 @@ TEST(SinfTest, SmallValues) {
// SDCOMP-26094: check sinf in the cases for which the range reducer
// returns values furthest beyond its nominal upper bound of pi/4.
-TEST(SinfTest, SDCOMP_26094) {
+TEST(LlvmLibcSinfTest, SDCOMP_26094) {
for (uint32_t v : sdcomp26094Values) {
float x = valueFromBits(v);
EXPECT_MPFR_MATCH(mpfr::Operation::Sin, x, __llvm_libc::sinf(x), 1.0);
diff --git a/libc/test/src/math/sqrt_test.cpp b/libc/test/src/math/sqrt_test.cpp
index f0a1ffff82f1..a224ff9da22f 100644
--- a/libc/test/src/math/sqrt_test.cpp
+++ b/libc/test/src/math/sqrt_test.cpp
@@ -22,7 +22,7 @@ constexpr UIntType HiddenBit =
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(SqrtTest, SpecialValues) {
+TEST(LlvmLibcSqrtTest, SpecialValues) {
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrt(aNaN));
ASSERT_FP_EQ(inf, __llvm_libc::sqrt(inf));
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrt(negInf));
@@ -34,7 +34,7 @@ TEST(SqrtTest, SpecialValues) {
ASSERT_FP_EQ(3.0, __llvm_libc::sqrt(9.0));
}
-TEST(SqrtTest, DenormalValues) {
+TEST(LlvmLibcSqrtTest, DenormalValues) {
for (UIntType mant = 1; mant < HiddenBit; mant <<= 1) {
FPBits denormal(0.0);
denormal.mantissa = mant;
@@ -51,7 +51,7 @@ TEST(SqrtTest, DenormalValues) {
}
}
-TEST(SqrtTest, InDoubleRange) {
+TEST(LlvmLibcSqrtTest, InDoubleRange) {
constexpr UIntType count = 10'000'001;
constexpr UIntType step = UIntType(-1) / count;
for (UIntType i = 0, v = 0; i <= count; ++i, v += step) {
diff --git a/libc/test/src/math/sqrtf_test.cpp b/libc/test/src/math/sqrtf_test.cpp
index 2f1b8071227b..6242e25102a0 100644
--- a/libc/test/src/math/sqrtf_test.cpp
+++ b/libc/test/src/math/sqrtf_test.cpp
@@ -22,7 +22,7 @@ constexpr UIntType HiddenBit =
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(SqrtfTest, SpecialValues) {
+TEST(LlvmLibcSqrtfTest, SpecialValues) {
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrtf(aNaN));
ASSERT_FP_EQ(inf, __llvm_libc::sqrtf(inf));
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrtf(negInf));
@@ -34,7 +34,7 @@ TEST(SqrtfTest, SpecialValues) {
ASSERT_FP_EQ(3.0f, __llvm_libc::sqrtf(9.0f));
}
-TEST(SqrtfTest, DenormalValues) {
+TEST(LlvmLibcSqrtfTest, DenormalValues) {
for (UIntType mant = 1; mant < HiddenBit; mant <<= 1) {
FPBits denormal(0.0f);
denormal.mantissa = mant;
@@ -51,7 +51,7 @@ TEST(SqrtfTest, DenormalValues) {
}
}
-TEST(SqrtfTest, InFloatRange) {
+TEST(LlvmLibcSqrtfTest, InFloatRange) {
constexpr UIntType count = 10'000'001;
constexpr UIntType step = UIntType(-1) / count;
for (UIntType i = 0, v = 0; i <= count; ++i, v += step) {
diff --git a/libc/test/src/math/sqrtl_test.cpp b/libc/test/src/math/sqrtl_test.cpp
index 6e7a092aef66..37d706c8682e 100644
--- a/libc/test/src/math/sqrtl_test.cpp
+++ b/libc/test/src/math/sqrtl_test.cpp
@@ -22,7 +22,7 @@ constexpr UIntType HiddenBit =
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(SqrtlTest, SpecialValues) {
+TEST(LlvmLibcSqrtlTest, SpecialValues) {
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrtl(aNaN));
ASSERT_FP_EQ(inf, __llvm_libc::sqrtl(inf));
ASSERT_FP_EQ(aNaN, __llvm_libc::sqrtl(negInf));
@@ -34,7 +34,7 @@ TEST(SqrtlTest, SpecialValues) {
ASSERT_FP_EQ(3.0L, __llvm_libc::sqrtl(9.0L));
}
-TEST(SqrtlTest, DenormalValues) {
+TEST(LlvmLibcSqrtlTest, DenormalValues) {
for (UIntType mant = 1; mant < HiddenBit; mant <<= 1) {
FPBits denormal(0.0L);
denormal.mantissa = mant;
@@ -51,7 +51,7 @@ TEST(SqrtlTest, DenormalValues) {
}
}
-TEST(SqrtlTest, InLongDoubleRange) {
+TEST(LlvmLibcSqrtlTest, InLongDoubleRange) {
constexpr UIntType count = 10'000'001;
constexpr UIntType step = UIntType(-1) / count;
for (UIntType i = 0, v = 0; i <= count; ++i, v += step) {
diff --git a/libc/test/src/math/trunc_test.cpp b/libc/test/src/math/trunc_test.cpp
index 58020df53406..ee74485c083a 100644
--- a/libc/test/src/math/trunc_test.cpp
+++ b/libc/test/src/math/trunc_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(double)
-TEST(TruncTest, SpecialNumbers) {
+TEST(LlvmLibcTruncTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::trunc(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::trunc(negZero));
@@ -29,7 +29,7 @@ TEST(TruncTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::trunc(aNaN));
}
-TEST(TruncTest, RoundedNumbers) {
+TEST(LlvmLibcTruncTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0, __llvm_libc::trunc(1.0));
EXPECT_FP_EQ(-1.0, __llvm_libc::trunc(-1.0));
EXPECT_FP_EQ(10.0, __llvm_libc::trunc(10.0));
@@ -38,7 +38,7 @@ TEST(TruncTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::trunc(-1234.0));
}
-TEST(TruncTest, Fractions) {
+TEST(LlvmLibcTruncTest, Fractions) {
EXPECT_FP_EQ(0.0, __llvm_libc::trunc(0.5));
EXPECT_FP_EQ(-0.0, __llvm_libc::trunc(-0.5));
EXPECT_FP_EQ(0.0, __llvm_libc::trunc(0.115));
@@ -61,7 +61,7 @@ TEST(TruncTest, Fractions) {
EXPECT_FP_EQ(-1234.0, __llvm_libc::trunc(-1234.96));
}
-TEST(TruncTest, InDoubleRange) {
+TEST(LlvmLibcTruncTest, InDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/truncf_test.cpp b/libc/test/src/math/truncf_test.cpp
index 3d5c5e3fc6bd..00f3d4601ae3 100644
--- a/libc/test/src/math/truncf_test.cpp
+++ b/libc/test/src/math/truncf_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(float)
-TEST(TruncfTest, SpecialNumbers) {
+TEST(LlvmLibcTruncfTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::truncf(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::truncf(negZero));
@@ -29,7 +29,7 @@ TEST(TruncfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::truncf(aNaN));
}
-TEST(TruncfTest, RoundedNumbers) {
+TEST(LlvmLibcTruncfTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0f, __llvm_libc::truncf(1.0f));
EXPECT_FP_EQ(-1.0f, __llvm_libc::truncf(-1.0f));
EXPECT_FP_EQ(10.0f, __llvm_libc::truncf(10.0f));
@@ -38,7 +38,7 @@ TEST(TruncfTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::truncf(-1234.0f));
}
-TEST(TruncfTest, Fractions) {
+TEST(LlvmLibcTruncfTest, Fractions) {
EXPECT_FP_EQ(0.0f, __llvm_libc::truncf(0.5f));
EXPECT_FP_EQ(-0.0f, __llvm_libc::truncf(-0.5f));
EXPECT_FP_EQ(0.0f, __llvm_libc::truncf(0.115f));
@@ -61,7 +61,7 @@ TEST(TruncfTest, Fractions) {
EXPECT_FP_EQ(-1234.0f, __llvm_libc::truncf(-1234.96f));
}
-TEST(TruncfTest, InFloatRange) {
+TEST(LlvmLibcTruncfTest, InFloatRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 1000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/math/truncl_test.cpp b/libc/test/src/math/truncl_test.cpp
index f00d0c375d7a..e50e7a3aebcd 100644
--- a/libc/test/src/math/truncl_test.cpp
+++ b/libc/test/src/math/truncl_test.cpp
@@ -19,7 +19,7 @@ namespace mpfr = __llvm_libc::testing::mpfr;
DECLARE_SPECIAL_CONSTANTS(long double)
-TEST(TrunclTest, SpecialNumbers) {
+TEST(LlvmLibcTrunclTest, SpecialNumbers) {
EXPECT_FP_EQ(zero, __llvm_libc::truncl(zero));
EXPECT_FP_EQ(negZero, __llvm_libc::truncl(negZero));
@@ -29,7 +29,7 @@ TEST(TrunclTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, __llvm_libc::truncl(aNaN));
}
-TEST(TrunclTest, RoundedNumbers) {
+TEST(LlvmLibcTrunclTest, RoundedNumbers) {
EXPECT_FP_EQ(1.0l, __llvm_libc::truncl(1.0l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::truncl(-1.0l));
EXPECT_FP_EQ(10.0l, __llvm_libc::truncl(10.0l));
@@ -38,7 +38,7 @@ TEST(TrunclTest, RoundedNumbers) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::truncl(-1234.0l));
}
-TEST(TrunclTest, Fractions) {
+TEST(LlvmLibcTrunclTest, Fractions) {
EXPECT_FP_EQ(0.0l, __llvm_libc::truncl(0.5l));
EXPECT_FP_EQ(-0.0l, __llvm_libc::truncl(-0.5l));
EXPECT_FP_EQ(0.0l, __llvm_libc::truncl(0.115l));
@@ -61,7 +61,7 @@ TEST(TrunclTest, Fractions) {
EXPECT_FP_EQ(-1234.0l, __llvm_libc::truncl(-1234.96l));
}
-TEST(TrunclTest, InLongDoubleRange) {
+TEST(LlvmLibcTrunclTest, InLongDoubleRange) {
using UIntType = FPBits::UIntType;
constexpr UIntType count = 10000000;
constexpr UIntType step = UIntType(-1) / count;
diff --git a/libc/test/src/signal/raise_test.cpp b/libc/test/src/signal/raise_test.cpp
index 08f5b60116c8..4ec1ee20b4d6 100644
--- a/libc/test/src/signal/raise_test.cpp
+++ b/libc/test/src/signal/raise_test.cpp
@@ -11,7 +11,7 @@
#include "utils/UnitTest/Test.h"
-TEST(SignalTest, Raise) {
+TEST(LlvmLibcSignalTest, Raise) {
// SIGCONT is ingored unless stopped, so we can use it to check the return
// value of raise without needing to block.
EXPECT_EQ(__llvm_libc::raise(SIGCONT), 0);
diff --git a/libc/test/src/signal/sigaction_test.cpp b/libc/test/src/signal/sigaction_test.cpp
index a473b646072f..dab22956ed9e 100644
--- a/libc/test/src/signal/sigaction_test.cpp
+++ b/libc/test/src/signal/sigaction_test.cpp
@@ -18,13 +18,13 @@
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
-TEST(Sigaction, Invalid) {
+TEST(LlvmLibcSigaction, Invalid) {
// -1 is a much larger signal that NSIG, so this should fail.
EXPECT_THAT(__llvm_libc::sigaction(-1, nullptr, nullptr), Fails(EINVAL));
}
// SIGKILL cannot have its action changed, but it can be examined.
-TEST(Sigaction, Sigkill) {
+TEST(LlvmLibcSigaction, Sigkill) {
struct __sigaction action;
EXPECT_THAT(__llvm_libc::sigaction(SIGKILL, nullptr, &action), Succeeds());
EXPECT_THAT(__llvm_libc::sigaction(SIGKILL, &action, nullptr), Fails(EINVAL));
@@ -33,7 +33,7 @@ TEST(Sigaction, Sigkill) {
static int sigusr1Count;
static bool correctSignal;
-TEST(Sigaction, CustomAction) {
+TEST(LlvmLibcSigaction, CustomAction) {
// Zero this incase tests get run multiple times in the future.
sigusr1Count = 0;
@@ -56,7 +56,7 @@ TEST(Sigaction, CustomAction) {
EXPECT_DEATH([] { __llvm_libc::raise(SIGUSR1); }, SIGUSR1);
}
-TEST(Sigaction, Ignore) {
+TEST(LlvmLibcSigaction, Ignore) {
struct __sigaction action;
EXPECT_THAT(__llvm_libc::sigaction(SIGUSR1, nullptr, &action), Succeeds());
action.sa_handler = SIG_IGN;
diff --git a/libc/test/src/signal/sigaddset_test.cpp b/libc/test/src/signal/sigaddset_test.cpp
index 922110b397b6..7633bdbc44f0 100644
--- a/libc/test/src/signal/sigaddset_test.cpp
+++ b/libc/test/src/signal/sigaddset_test.cpp
@@ -14,7 +14,7 @@
#include "utils/UnitTest/Test.h"
// This tests invalid inputs and ensures errno is properly set.
-TEST(SignalTest, SigaddsetInvalid) {
+TEST(LlvmLibcSignalTest, SigaddsetInvalid) {
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
EXPECT_THAT(__llvm_libc::sigaddset(nullptr, SIGSEGV), Fails(EINVAL));
diff --git a/libc/test/src/signal/sigdelset_test.cpp b/libc/test/src/signal/sigdelset_test.cpp
index 42ba9335e219..b490a0881831 100644
--- a/libc/test/src/signal/sigdelset_test.cpp
+++ b/libc/test/src/signal/sigdelset_test.cpp
@@ -16,7 +16,7 @@
#include "test/ErrnoSetterMatcher.h"
#include "utils/UnitTest/Test.h"
-TEST(Sigdelset, Invalid) {
+TEST(LlvmLibcSigdelset, Invalid) {
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
// Invalid set.
EXPECT_THAT(__llvm_libc::sigdelset(nullptr, SIGUSR1), Fails(EINVAL));
@@ -26,7 +26,7 @@ TEST(Sigdelset, Invalid) {
EXPECT_THAT(__llvm_libc::sigdelset(&set, -1), Fails(EINVAL));
}
-TEST(Sigdelset, UnblockOne) {
+TEST(LlvmLibcSigdelset, UnblockOne) {
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
sigset_t set;
EXPECT_THAT(__llvm_libc::sigfillset(&set), Succeeds());
diff --git a/libc/test/src/signal/sigfillset_test.cpp b/libc/test/src/signal/sigfillset_test.cpp
index 16f87e641fbe..3f5561eb153e 100644
--- a/libc/test/src/signal/sigfillset_test.cpp
+++ b/libc/test/src/signal/sigfillset_test.cpp
@@ -15,12 +15,12 @@
#include "test/ErrnoSetterMatcher.h"
#include "utils/UnitTest/Test.h"
-TEST(Sigfillset, Invalid) {
+TEST(LlvmLibcSigfillset, Invalid) {
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
EXPECT_THAT(__llvm_libc::sigfillset(nullptr), Fails(EINVAL));
}
-TEST(Sigfillset, BlocksAll) {
+TEST(LlvmLibcSigfillset, BlocksAll) {
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
sigset_t set;
EXPECT_THAT(__llvm_libc::sigfillset(&set), Succeeds());
diff --git a/libc/test/src/signal/signal_test.cpp b/libc/test/src/signal/signal_test.cpp
index 03bf22a5f3eb..edcecbb09752 100644
--- a/libc/test/src/signal/signal_test.cpp
+++ b/libc/test/src/signal/signal_test.cpp
@@ -18,7 +18,7 @@
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
-TEST(Signal, Invalid) {
+TEST(LlvmLibcSignal, Invalid) {
llvmlibc_errno = 0;
__llvm_libc::sighandler_t valid = +[](int) {};
EXPECT_THAT((void *)__llvm_libc::signal(0, valid),
@@ -28,7 +28,7 @@ TEST(Signal, Invalid) {
}
static int sum;
-TEST(Signal, Basic) {
+TEST(LlvmLibcSignal, Basic) {
// In case test get run multiple times.
sum = 0;
ASSERT_NE(__llvm_libc::signal(SIGUSR1, +[](int) { sum++; }),
diff --git a/libc/test/src/signal/sigprocmask_test.cpp b/libc/test/src/signal/sigprocmask_test.cpp
index 90b57e9e0f2f..2b3a8f7cc303 100644
--- a/libc/test/src/signal/sigprocmask_test.cpp
+++ b/libc/test/src/signal/sigprocmask_test.cpp
@@ -17,7 +17,7 @@
#include "test/ErrnoSetterMatcher.h"
#include "utils/UnitTest/Test.h"
-class SignalTest : public __llvm_libc::testing::Test {
+class LlvmLibcSignalTest : public __llvm_libc::testing::Test {
sigset_t oldSet;
public:
@@ -32,7 +32,7 @@ using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
// This tests for invalid input.
-TEST_F(SignalTest, SigprocmaskInvalid) {
+TEST_F(LlvmLibcSignalTest, SigprocmaskInvalid) {
llvmlibc_errno = 0;
sigset_t valid;
@@ -49,7 +49,7 @@ TEST_F(SignalTest, SigprocmaskInvalid) {
// This tests that when nothing is blocked, a process gets killed and alse tests
// that when signals are blocked they are not delivered to the process.
-TEST_F(SignalTest, BlockUnblock) {
+TEST_F(LlvmLibcSignalTest, BlockUnblock) {
sigset_t sigset;
EXPECT_EQ(__llvm_libc::sigemptyset(&sigset), 0);
EXPECT_EQ(__llvm_libc::sigprocmask(SIG_SETMASK, &sigset, nullptr), 0);
diff --git a/libc/test/src/stdio/fwrite_test.cpp b/libc/test/src/stdio/fwrite_test.cpp
index 2b7bf0f0a335..a65555d19842 100644
--- a/libc/test/src/stdio/fwrite_test.cpp
+++ b/libc/test/src/stdio/fwrite_test.cpp
@@ -11,7 +11,7 @@
#include "utils/CPP/Array.h"
#include "utils/UnitTest/Test.h"
-TEST(Stdio, FWriteBasic) {
+TEST(LlvmLibcStdio, FWriteBasic) {
struct StrcpyFile : __llvm_libc::FILE {
char *buf;
} f;
diff --git a/libc/test/src/stdlib/_Exit_test.cpp b/libc/test/src/stdlib/_Exit_test.cpp
index 6593a874cd9d..03d5ffcc2236 100644
--- a/libc/test/src/stdlib/_Exit_test.cpp
+++ b/libc/test/src/stdlib/_Exit_test.cpp
@@ -10,7 +10,7 @@
#include "src/stdlib/_Exit.h"
#include "utils/UnitTest/Test.h"
-TEST(Stdlib, _Exit) {
+TEST(LlvmLibcStdlib, _Exit) {
EXPECT_EXITS([] { __llvm_libc::_Exit(1); }, 1);
EXPECT_EXITS([] { __llvm_libc::_Exit(65); }, 65);
}
diff --git a/libc/test/src/stdlib/abort_test.cpp b/libc/test/src/stdlib/abort_test.cpp
index d5eec4b6ecf3..8762f2ff611e 100644
--- a/libc/test/src/stdlib/abort_test.cpp
+++ b/libc/test/src/stdlib/abort_test.cpp
@@ -11,7 +11,7 @@
#include "src/stdlib/abort.h"
#include "utils/UnitTest/Test.h"
-TEST(Stdlib, abort) {
+TEST(LlvmLibcStdlib, abort) {
// -1 matches against any signal, which is necessary for now until
// __llvm_libc::abort() unblocks SIGABRT.
EXPECT_DEATH([] { __llvm_libc::abort(); }, -1);
diff --git a/libc/test/src/stdlib/abs_test.cpp b/libc/test/src/stdlib/abs_test.cpp
index 6f1a46ea8355..e01cd1892f3d 100644
--- a/libc/test/src/stdlib/abs_test.cpp
+++ b/libc/test/src/stdlib/abs_test.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/abs.h"
#include "utils/UnitTest/Test.h"
-TEST(AbsTest, Zero) { EXPECT_EQ(__llvm_libc::abs(0), 0); }
+TEST(LlvmLibcAbsTest, Zero) { EXPECT_EQ(__llvm_libc::abs(0), 0); }
-TEST(AbsTest, Positive) { EXPECT_EQ(__llvm_libc::abs(1), 1); }
+TEST(LlvmLibcAbsTest, Positive) { EXPECT_EQ(__llvm_libc::abs(1), 1); }
-TEST(AbsTest, Negative) { EXPECT_EQ(__llvm_libc::abs(-1), 1); }
+TEST(LlvmLibcAbsTest, Negative) { EXPECT_EQ(__llvm_libc::abs(-1), 1); }
diff --git a/libc/test/src/stdlib/labs_test.cpp b/libc/test/src/stdlib/labs_test.cpp
index cd814252f809..144cbc6fd48b 100644
--- a/libc/test/src/stdlib/labs_test.cpp
+++ b/libc/test/src/stdlib/labs_test.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/labs.h"
#include "utils/UnitTest/Test.h"
-TEST(LabsTest, Zero) { EXPECT_EQ(__llvm_libc::labs(0l), 0l); }
+TEST(LlvmLibcLabsTest, Zero) { EXPECT_EQ(__llvm_libc::labs(0l), 0l); }
-TEST(LabsTest, Positive) { EXPECT_EQ(__llvm_libc::labs(1l), 1l); }
+TEST(LlvmLibcLabsTest, Positive) { EXPECT_EQ(__llvm_libc::labs(1l), 1l); }
-TEST(LabsTest, Negative) { EXPECT_EQ(__llvm_libc::labs(-1l), 1l); }
+TEST(LlvmLibcLabsTest, Negative) { EXPECT_EQ(__llvm_libc::labs(-1l), 1l); }
diff --git a/libc/test/src/stdlib/llabs_test.cpp b/libc/test/src/stdlib/llabs_test.cpp
index 4b5fde9a4c9b..4d86c8fe6918 100644
--- a/libc/test/src/stdlib/llabs_test.cpp
+++ b/libc/test/src/stdlib/llabs_test.cpp
@@ -9,8 +9,8 @@
#include "src/stdlib/llabs.h"
#include "utils/UnitTest/Test.h"
-TEST(LlabsTest, Zero) { EXPECT_EQ(__llvm_libc::llabs(0ll), 0ll); }
+TEST(LlvmLibcLlabsTest, Zero) { EXPECT_EQ(__llvm_libc::llabs(0ll), 0ll); }
-TEST(LlabsTest, Positive) { EXPECT_EQ(__llvm_libc::llabs(1ll), 1ll); }
+TEST(LlvmLibcLlabsTest, Positive) { EXPECT_EQ(__llvm_libc::llabs(1ll), 1ll); }
-TEST(LlabsTest, Negative) { EXPECT_EQ(__llvm_libc::llabs(-1ll), 1ll); }
+TEST(LlvmLibcLlabsTest, Negative) { EXPECT_EQ(__llvm_libc::llabs(-1ll), 1ll); }
diff --git a/libc/test/src/string/bzero_test.cpp b/libc/test/src/string/bzero_test.cpp
index fee26597d040..d56af889a250 100644
--- a/libc/test/src/string/bzero_test.cpp
+++ b/libc/test/src/string/bzero_test.cpp
@@ -24,7 +24,7 @@ Data getData(ArrayRef<char> filler) {
return out;
}
-TEST(BzeroTest, Thorough) {
+TEST(LlvmLibcBzeroTest, Thorough) {
const Data dirty = getData(kDeadcode);
for (size_t count = 0; count < 1024; ++count) {
for (size_t align = 0; align < 64; ++align) {
diff --git a/libc/test/src/string/memchr_test.cpp b/libc/test/src/string/memchr_test.cpp
index 005e02c6b3d4..5b70b4e89b51 100644
--- a/libc/test/src/string/memchr_test.cpp
+++ b/libc/test/src/string/memchr_test.cpp
@@ -16,7 +16,7 @@ const char *call_memchr(const void *src, int c, size_t size) {
return reinterpret_cast<const char *>(__llvm_libc::memchr(src, c, size));
}
-TEST(MemChrTest, FindsCharacterAfterNullTerminator) {
+TEST(LlvmLibcMemChrTest, FindsCharacterAfterNullTerminator) {
// memchr should continue searching after a null terminator.
const size_t size = 5;
const unsigned char src[size] = {'a', '\0', 'b', 'c', '\0'};
@@ -24,7 +24,7 @@ TEST(MemChrTest, FindsCharacterAfterNullTerminator) {
ASSERT_STREQ(call_memchr(src, 'b', size), "bc");
}
-TEST(MemChrTest, FindsCharacterInNonNullTerminatedCollection) {
+TEST(LlvmLibcMemChrTest, FindsCharacterInNonNullTerminatedCollection) {
const size_t size = 3;
const unsigned char src[size] = {'a', 'b', 'c'};
// Should return 'b', 'c'.
@@ -33,49 +33,49 @@ TEST(MemChrTest, FindsCharacterInNonNullTerminatedCollection) {
ASSERT_EQ(ret[1], 'c');
}
-TEST(MemChrTest, FindsFirstCharacter) {
+TEST(LlvmLibcMemChrTest, FindsFirstCharacter) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return original array since 'a' is the first character.
ASSERT_STREQ(call_memchr(src, 'a', size), "abcde");
}
-TEST(MemChrTest, FindsMiddleCharacter) {
+TEST(LlvmLibcMemChrTest, FindsMiddleCharacter) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return characters after (and including) 'c'.
ASSERT_STREQ(call_memchr(src, 'c', size), "cde");
}
-TEST(MemChrTest, FindsLastCharacterThatIsNotNullTerminator) {
+TEST(LlvmLibcMemChrTest, FindsLastCharacterThatIsNotNullTerminator) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return 'e' and null-terminator.
ASSERT_STREQ(call_memchr(src, 'e', size), "e");
}
-TEST(MemChrTest, FindsNullTerminator) {
+TEST(LlvmLibcMemChrTest, FindsNullTerminator) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return null terminator.
ASSERT_STREQ(call_memchr(src, '\0', size), "");
}
-TEST(MemChrTest, CharacterNotWithinStringShouldReturnNullptr) {
+TEST(LlvmLibcMemChrTest, CharacterNotWithinStringShouldReturnNullptr) {
const size_t size = 4;
const unsigned char src[size] = {'1', '2', '3', '?'};
// Since 'z' is not within 'characters', should return nullptr.
ASSERT_STREQ(call_memchr(src, 'z', size), nullptr);
}
-TEST(MemChrTest, CharacterNotWithinSizeShouldReturnNullptr) {
+TEST(LlvmLibcMemChrTest, CharacterNotWithinSizeShouldReturnNullptr) {
const unsigned char src[5] = {'1', '2', '3', '4', '\0'};
// Since '4' is not the first or second character, this should return nullptr.
const size_t size = 2;
ASSERT_STREQ(call_memchr(src, '4', size), nullptr);
}
-TEST(MemChrTest, TheSourceShouldNotChange) {
+TEST(LlvmLibcMemChrTest, TheSourceShouldNotChange) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
const char *src_copy = reinterpret_cast<const char *>(src);
@@ -87,14 +87,14 @@ TEST(MemChrTest, TheSourceShouldNotChange) {
ASSERT_STREQ(reinterpret_cast<const char *>(src), src_copy);
}
-TEST(MemChrTest, ShouldFindFirstOfDuplicates) {
+TEST(LlvmLibcMemChrTest, ShouldFindFirstOfDuplicates) {
const size_t size = 12; // 11 characters + null terminator.
const char *dups = "abc1def1ghi";
// 1 is duplicated in 'dups', but it should find the first copy.
ASSERT_STREQ(call_memchr(dups, '1', size), "1def1ghi");
}
-TEST(MemChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
+TEST(LlvmLibcMemChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
const size_t size = 1; // Null terminator.
const char *empty_string = "";
// Null terminator should match.
@@ -105,14 +105,14 @@ TEST(MemChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
ASSERT_STREQ(call_memchr(empty_string, '?', size), nullptr);
}
-TEST(MemChrTest, SingleRepeatedCharacterShouldReturnFirst) {
+TEST(LlvmLibcMemChrTest, SingleRepeatedCharacterShouldReturnFirst) {
const char *dups = "XXXXX";
const size_t size = 6; // 5 characters + null terminator.
// Should return original string since X is first character.
ASSERT_STREQ(call_memchr(dups, 'X', size), dups);
}
-TEST(MemChrTest, SignedCharacterFound) {
+TEST(LlvmLibcMemChrTest, SignedCharacterFound) {
char c = -1;
const size_t size = 1;
char src[size] = {c};
diff --git a/libc/test/src/string/memcmp_test.cpp b/libc/test/src/string/memcmp_test.cpp
index 3cfde0e8a34f..2c1d9bfb9a16 100644
--- a/libc/test/src/string/memcmp_test.cpp
+++ b/libc/test/src/string/memcmp_test.cpp
@@ -9,25 +9,25 @@
#include "src/string/memcmp.h"
#include "utils/UnitTest/Test.h"
-TEST(MemcmpTest, CmpZeroByte) {
+TEST(LlvmLibcMemcmpTest, CmpZeroByte) {
const char *lhs = "ab";
const char *rhs = "bc";
EXPECT_EQ(__llvm_libc::memcmp(lhs, rhs, 0), 0);
}
-TEST(MemcmpTest, LhsRhsAreTheSame) {
+TEST(LlvmLibcMemcmpTest, LhsRhsAreTheSame) {
const char *lhs = "ab";
const char *rhs = "ab";
EXPECT_EQ(__llvm_libc::memcmp(lhs, rhs, 2), 0);
}
-TEST(MemcmpTest, LhsBeforeRhsLexically) {
+TEST(LlvmLibcMemcmpTest, LhsBeforeRhsLexically) {
const char *lhs = "ab";
const char *rhs = "ac";
EXPECT_EQ(__llvm_libc::memcmp(lhs, rhs, 2), -1);
}
-TEST(MemcmpTest, LhsAfterRhsLexically) {
+TEST(LlvmLibcMemcmpTest, LhsAfterRhsLexically) {
const char *lhs = "ac";
const char *rhs = "ab";
EXPECT_EQ(__llvm_libc::memcmp(lhs, rhs, 2), 1);
diff --git a/libc/test/src/string/memcpy_test.cpp b/libc/test/src/string/memcpy_test.cpp
index a9341f8778ff..fc9b8f3ea796 100644
--- a/libc/test/src/string/memcpy_test.cpp
+++ b/libc/test/src/string/memcpy_test.cpp
@@ -25,7 +25,7 @@ Data getData(ArrayRef<char> filler) {
return out;
}
-TEST(MemcpyTest, Thorough) {
+TEST(LlvmLibcMemcpyTest, Thorough) {
const Data groundtruth = getData(kNumbers);
const Data dirty = getData(kDeadcode);
for (size_t count = 0; count < 1024; ++count) {
diff --git a/libc/test/src/string/memmove_test.cpp b/libc/test/src/string/memmove_test.cpp
index 88a0139d5ff8..e13722da7668 100644
--- a/libc/test/src/string/memmove_test.cpp
+++ b/libc/test/src/string/memmove_test.cpp
@@ -11,7 +11,7 @@
#include "utils/CPP/ArrayRef.h"
#include "utils/UnitTest/Test.h"
-class MemmoveTest : public __llvm_libc::testing::Test {
+class LlvmLibcMemmoveTest : public __llvm_libc::testing::Test {
public:
void check_memmove(void *dest, const void *src, size_t count, const void *str,
const __llvm_libc::cpp::ArrayRef<unsigned char> expected) {
@@ -25,20 +25,20 @@ class MemmoveTest : public __llvm_libc::testing::Test {
}
};
-TEST_F(MemmoveTest, MoveZeroByte) {
+TEST_F(LlvmLibcMemmoveTest, MoveZeroByte) {
unsigned char dest[] = {'a', 'b'};
const unsigned char src[] = {'y', 'z'};
const unsigned char expected[] = {'a', 'b'};
check_memmove(dest, src, 0, dest, expected);
}
-TEST_F(MemmoveTest, OverlapThatDestAndSrcPointToSameAddress) {
+TEST_F(LlvmLibcMemmoveTest, OverlapThatDestAndSrcPointToSameAddress) {
unsigned char str[] = {'a', 'b'};
const unsigned char expected[] = {'a', 'b'};
check_memmove(str, str, 1, str, expected);
}
-TEST_F(MemmoveTest, OverlapThatDestStartsBeforeSrc) {
+TEST_F(LlvmLibcMemmoveTest, OverlapThatDestStartsBeforeSrc) {
// Set boundary at beginning and end for not overstepping when
// copy forward or backward.
unsigned char str[] = {'z', 'a', 'b', 'c', 'z'};
@@ -47,7 +47,7 @@ TEST_F(MemmoveTest, OverlapThatDestStartsBeforeSrc) {
check_memmove(&str[1], &str[2], 2, str, expected);
}
-TEST_F(MemmoveTest, OverlapThatDestStartsAfterSrc) {
+TEST_F(LlvmLibcMemmoveTest, OverlapThatDestStartsAfterSrc) {
unsigned char str[] = {'z', 'a', 'b', 'c', 'z'};
const unsigned char expected[] = {'z', 'a', 'a', 'b', 'z'};
check_memmove(&str[2], &str[1], 2, str, expected);
@@ -57,13 +57,13 @@ TEST_F(MemmoveTest, OverlapThatDestStartsAfterSrc) {
// str: [abcdefghij]
// [__src_____]
// [_____dest_]
-TEST_F(MemmoveTest, SrcFollowDest) {
+TEST_F(LlvmLibcMemmoveTest, SrcFollowDest) {
unsigned char str[] = {'z', 'a', 'b', 'z'};
const unsigned char expected[] = {'z', 'b', 'b', 'z'};
check_memmove(&str[1], &str[2], 1, str, expected);
}
-TEST_F(MemmoveTest, DestFollowSrc) {
+TEST_F(LlvmLibcMemmoveTest, DestFollowSrc) {
unsigned char str[] = {'z', 'a', 'b', 'z'};
const unsigned char expected[] = {'z', 'a', 'a', 'z'};
check_memmove(&str[2], &str[1], 1, str, expected);
diff --git a/libc/test/src/string/memory_utils/memcpy_utils_test.cpp b/libc/test/src/string/memory_utils/memcpy_utils_test.cpp
index d45794710862..be749c1b150b 100644
--- a/libc/test/src/string/memory_utils/memcpy_utils_test.cpp
+++ b/libc/test/src/string/memory_utils/memcpy_utils_test.cpp
@@ -79,7 +79,7 @@ extern "C" void LLVM_LIBC_MEMCPY_MONITOR(char *__restrict dst,
char *I(uintptr_t offset) { return reinterpret_cast<char *>(offset); }
-TEST(MemcpyUtilsTest, CopyTrivial) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyTrivial) {
auto &trace = GetTrace();
trace.Clear();
@@ -122,7 +122,7 @@ TEST(MemcpyUtilsTest, CopyTrivial) {
"1111111111111111111111111111111111111111111111111111111111111111");
}
-TEST(MemcpyUtilsTest, CopyOffset) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyOffset) {
auto &trace = GetTrace();
trace.Clear();
@@ -136,7 +136,7 @@ TEST(MemcpyUtilsTest, CopyOffset) {
EXPECT_STREQ(trace.Read(), "01");
}
-TEST(MemcpyUtilsTest, CopyBlockOverlap) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyBlockOverlap) {
auto &trace = GetTrace();
trace.Clear();
@@ -160,7 +160,7 @@ TEST(MemcpyUtilsTest, CopyBlockOverlap) {
EXPECT_STREQ(trace.Read(), "01112111");
}
-TEST(MemcpyUtilsTest, CopyAlignedBlocks) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyAlignedBlocks) {
auto &trace = GetTrace();
// Source is aligned and multiple of alignment.
// "1111"
@@ -211,7 +211,7 @@ TEST(MemcpyUtilsTest, CopyAlignedBlocks) {
EXPECT_STREQ(trace.Read(), "011121111111");
}
-TEST(MemcpyUtilsTest, CopyAlignedBlocksWithAlignment) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyAlignedBlocksWithAlignment) {
auto &trace = GetTrace();
// Source is aligned and multiple of alignment.
// "11111111"
@@ -228,7 +228,7 @@ TEST(MemcpyUtilsTest, CopyAlignedBlocksWithAlignment) {
EXPECT_STREQ(trace.Read(), "122211111");
}
-TEST(MemcpyUtilsTest, CopyAlignedBlocksMaxReloads) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyAlignedBlocksMaxReloads) {
auto &trace = GetTrace();
for (size_t alignment = 0; alignment < 32; ++alignment) {
for (size_t count = 64; count < 768; ++count) {
@@ -248,7 +248,7 @@ TEST(MemcpyUtilsTest, CopyAlignedBlocksMaxReloads) {
}
}
-TEST(MemcpyUtilsTest, CopyAlignedBlocksWithAlignmentMaxReloads) {
+TEST(LlvmLibcMemcpyUtilsTest, CopyAlignedBlocksWithAlignmentMaxReloads) {
auto &trace = GetTrace();
for (size_t alignment = 0; alignment < 32; ++alignment) {
for (size_t count = 64; count < 768; ++count) {
diff --git a/libc/test/src/string/memory_utils/utils_test.cpp b/libc/test/src/string/memory_utils/utils_test.cpp
index b4f8188a3fa3..bb830d330674 100644
--- a/libc/test/src/string/memory_utils/utils_test.cpp
+++ b/libc/test/src/string/memory_utils/utils_test.cpp
@@ -12,7 +12,7 @@
namespace __llvm_libc {
-TEST(UtilsTest, IsPowerOfTwoOrZero) {
+TEST(LlvmLibcUtilsTest, IsPowerOfTwoOrZero) {
static const cpp::Array<bool, 65> kExpectedValues{
1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, // 0-15
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
@@ -24,7 +24,7 @@ TEST(UtilsTest, IsPowerOfTwoOrZero) {
EXPECT_EQ(is_power2_or_zero(i), kExpectedValues[i]);
}
-TEST(UtilsTest, IsPowerOfTwo) {
+TEST(LlvmLibcUtilsTest, IsPowerOfTwo) {
static const cpp::Array<bool, 65> kExpectedValues{
0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, // 0-15
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
@@ -36,7 +36,7 @@ TEST(UtilsTest, IsPowerOfTwo) {
EXPECT_EQ(is_power2(i), kExpectedValues[i]);
}
-TEST(UtilsTest, Log2) {
+TEST(LlvmLibcUtilsTest, Log2) {
static const cpp::Array<size_t, 65> kExpectedValues{
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, // 0-15
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, // 16-31
@@ -48,7 +48,7 @@ TEST(UtilsTest, Log2) {
EXPECT_EQ(log2(i), kExpectedValues[i]);
}
-TEST(UtilsTest, LEPowerOf2) {
+TEST(LlvmLibcUtilsTest, LEPowerOf2) {
static const cpp::Array<size_t, 65> kExpectedValues{
0, 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, // 0-15
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, // 16-31
@@ -60,7 +60,7 @@ TEST(UtilsTest, LEPowerOf2) {
EXPECT_EQ(le_power2(i), kExpectedValues[i]);
}
-TEST(UtilsTest, GEPowerOf2) {
+TEST(LlvmLibcUtilsTest, GEPowerOf2) {
static const cpp::Array<size_t, 66> kExpectedValues{
0, 1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, // 0-15
16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, // 16-31
@@ -79,7 +79,7 @@ const void *forge(size_t offset) {
return reinterpret_cast<const void *>(offset);
}
-TEST(UtilsTest, OffsetToNextAligned) {
+TEST(LlvmLibcUtilsTest, OffsetToNextAligned) {
EXPECT_EQ(offset_to_next_aligned<16>(forge(0)), I(0));
EXPECT_EQ(offset_to_next_aligned<16>(forge(1)), I(15));
EXPECT_EQ(offset_to_next_aligned<16>(forge(16)), I(0));
@@ -87,7 +87,7 @@ TEST(UtilsTest, OffsetToNextAligned) {
EXPECT_EQ(offset_to_next_aligned<32>(forge(16)), I(16));
}
-TEST(UtilsTest, OffsetFromLastAligned) {
+TEST(LlvmLibcUtilsTest, OffsetFromLastAligned) {
EXPECT_EQ(offset_from_last_aligned<16>(forge(0)), I(0));
EXPECT_EQ(offset_from_last_aligned<16>(forge(1)), I(1));
EXPECT_EQ(offset_from_last_aligned<16>(forge(16)), I(0));
@@ -95,7 +95,7 @@ TEST(UtilsTest, OffsetFromLastAligned) {
EXPECT_EQ(offset_from_last_aligned<32>(forge(16)), I(16));
}
-TEST(UtilsTest, OffsetToNextCacheLine) {
+TEST(LlvmLibcUtilsTest, OffsetToNextCacheLine) {
EXPECT_GT(LLVM_LIBC_CACHELINE_SIZE, 0);
EXPECT_EQ(offset_to_next_cache_line(forge(0)), I(0));
EXPECT_EQ(offset_to_next_cache_line(forge(1)),
diff --git a/libc/test/src/string/memrchr_test.cpp b/libc/test/src/string/memrchr_test.cpp
index 5f5f7a0d0182..d7a931970ce6 100644
--- a/libc/test/src/string/memrchr_test.cpp
+++ b/libc/test/src/string/memrchr_test.cpp
@@ -16,7 +16,7 @@ const char *call_memrchr(const void *src, int c, size_t size) {
return reinterpret_cast<const char *>(__llvm_libc::memrchr(src, c, size));
}
-TEST(MemRChrTest, FindsCharacterAfterNullTerminator) {
+TEST(LlvmLibcMemRChrTest, FindsCharacterAfterNullTerminator) {
// memrchr should continue searching after a null terminator.
const size_t size = 6;
const unsigned char src[size] = {'a', '\0', 'b', 'c', 'd', '\0'};
@@ -24,7 +24,7 @@ TEST(MemRChrTest, FindsCharacterAfterNullTerminator) {
ASSERT_STREQ(call_memrchr(src, 'b', size), "bcd");
}
-TEST(MemRChrTest, FindsCharacterInNonNullTerminatedCollection) {
+TEST(LlvmLibcMemRChrTest, FindsCharacterInNonNullTerminatedCollection) {
const size_t size = 3;
const unsigned char src[size] = {'a', 'b', 'c'};
// Should return 'b', 'c'.
@@ -33,49 +33,49 @@ TEST(MemRChrTest, FindsCharacterInNonNullTerminatedCollection) {
ASSERT_EQ(ret[1], 'c');
}
-TEST(MemRChrTest, FindsFirstCharacter) {
+TEST(LlvmLibcMemRChrTest, FindsFirstCharacter) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return original array since 'a' is the first character.
ASSERT_STREQ(call_memrchr(src, 'a', size), "abcde");
}
-TEST(MemRChrTest, FindsMiddleCharacter) {
+TEST(LlvmLibcMemRChrTest, FindsMiddleCharacter) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return characters after (and including) 'c'.
ASSERT_STREQ(call_memrchr(src, 'c', size), "cde");
}
-TEST(MemRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
+TEST(LlvmLibcMemRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return 'e' and null-terminator.
ASSERT_STREQ(call_memrchr(src, 'e', size), "e");
}
-TEST(MemRChrTest, FindsNullTerminator) {
+TEST(LlvmLibcMemRChrTest, FindsNullTerminator) {
const size_t size = 6;
const unsigned char src[size] = {'a', 'b', 'c', 'd', 'e', '\0'};
// Should return null terminator.
ASSERT_STREQ(call_memrchr(src, '\0', size), "");
}
-TEST(MemRChrTest, CharacterNotWithinStringShouldReturnNullptr) {
+TEST(LlvmLibcMemRChrTest, CharacterNotWithinStringShouldReturnNullptr) {
const size_t size = 4;
const unsigned char src[size] = {'1', '2', '3', '?'};
// Since 'z' is not within 'characters', should return nullptr.
ASSERT_STREQ(call_memrchr(src, 'z', size), nullptr);
}
-TEST(MemRChrTest, CharacterNotWithinSizeShouldReturnNullptr) {
+TEST(LlvmLibcMemRChrTest, CharacterNotWithinSizeShouldReturnNullptr) {
const unsigned char src[5] = {'1', '2', '3', '4', '\0'};
// Since '4' is not within the first 2 characters, this should return nullptr.
const size_t size = 2;
ASSERT_STREQ(call_memrchr(src, '4', size), nullptr);
}
-TEST(MemRChrTest, ShouldFindLastOfDuplicates) {
+TEST(LlvmLibcMemRChrTest, ShouldFindLastOfDuplicates) {
size_t size = 12; // 11 characters + null terminator.
const char *dups = "abc1def1ghi";
// 1 is duplicated in 'dups', but it should find the last copy.
@@ -87,7 +87,7 @@ TEST(MemRChrTest, ShouldFindLastOfDuplicates) {
ASSERT_STREQ(call_memrchr(repeated, 'X', size), "X");
}
-TEST(MemRChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
+TEST(LlvmLibcMemRChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
const size_t size = 1; // Null terminator.
const char *empty_string = "";
// Null terminator should match.
@@ -98,7 +98,7 @@ TEST(MemRChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
ASSERT_STREQ(call_memrchr(empty_string, '?', size), nullptr);
}
-TEST(MemRChrTest, SignedCharacterFound) {
+TEST(LlvmLibcMemRChrTest, SignedCharacterFound) {
char c = -1;
const size_t size = 1;
char src[size] = {c};
@@ -107,7 +107,7 @@ TEST(MemRChrTest, SignedCharacterFound) {
ASSERT_EQ(actual[0], c);
}
-TEST(MemRChrTest, ZeroLengthShouldReturnNullptr) {
+TEST(LlvmLibcMemRChrTest, ZeroLengthShouldReturnNullptr) {
const unsigned char src[4] = {'a', 'b', 'c', '\0'};
// This will iterate over exactly zero characters, so should return nullptr.
ASSERT_STREQ(call_memrchr(src, 'd', 0), nullptr);
diff --git a/libc/test/src/string/memset_test.cpp b/libc/test/src/string/memset_test.cpp
index 73a368f285d5..147ab1f08611 100644
--- a/libc/test/src/string/memset_test.cpp
+++ b/libc/test/src/string/memset_test.cpp
@@ -24,7 +24,7 @@ Data getData(ArrayRef<char> filler) {
return out;
}
-TEST(MemsetTest, Thorough) {
+TEST(LlvmLibcMemsetTest, Thorough) {
const Data dirty = getData(kDeadcode);
for (int value = -1; value <= 1; ++value) {
for (size_t count = 0; count < 1024; ++count) {
diff --git a/libc/test/src/string/strcat_test.cpp b/libc/test/src/string/strcat_test.cpp
index b32d5c7071ec..b72fe71d9307 100644
--- a/libc/test/src/string/strcat_test.cpp
+++ b/libc/test/src/string/strcat_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strcat.h"
#include "utils/UnitTest/Test.h"
-TEST(StrCatTest, EmptyDest) {
+TEST(LlvmLibcStrCatTest, EmptyDest) {
const char *abc = "abc";
char dest[4];
@@ -21,7 +21,7 @@ TEST(StrCatTest, EmptyDest) {
ASSERT_STREQ(dest, abc);
}
-TEST(StrCatTest, NonEmptyDest) {
+TEST(LlvmLibcStrCatTest, NonEmptyDest) {
const char *abc = "abc";
char dest[7];
diff --git a/libc/test/src/string/strchr_test.cpp b/libc/test/src/string/strchr_test.cpp
index dda930c0c155..6ba13f4a154a 100644
--- a/libc/test/src/string/strchr_test.cpp
+++ b/libc/test/src/string/strchr_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strchr.h"
#include "utils/UnitTest/Test.h"
-TEST(StrChrTest, FindsFirstCharacter) {
+TEST(LlvmLibcStrChrTest, FindsFirstCharacter) {
const char *src = "abcde";
// Should return original string since 'a' is the first character.
@@ -18,7 +18,7 @@ TEST(StrChrTest, FindsFirstCharacter) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrChrTest, FindsMiddleCharacter) {
+TEST(LlvmLibcStrChrTest, FindsMiddleCharacter) {
const char *src = "abcde";
// Should return characters after (and including) 'c'.
@@ -27,7 +27,7 @@ TEST(StrChrTest, FindsMiddleCharacter) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrChrTest, FindsLastCharacterThatIsNotNullTerminator) {
+TEST(LlvmLibcStrChrTest, FindsLastCharacterThatIsNotNullTerminator) {
const char *src = "abcde";
// Should return 'e' and null-terminator.
@@ -36,7 +36,7 @@ TEST(StrChrTest, FindsLastCharacterThatIsNotNullTerminator) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrChrTest, FindsNullTerminator) {
+TEST(LlvmLibcStrChrTest, FindsNullTerminator) {
const char *src = "abcde";
// Should return null terminator.
@@ -45,12 +45,12 @@ TEST(StrChrTest, FindsNullTerminator) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrChrTest, CharacterNotWithinStringShouldReturnNullptr) {
+TEST(LlvmLibcStrChrTest, CharacterNotWithinStringShouldReturnNullptr) {
// Since 'z' is not within the string, should return nullptr.
ASSERT_STREQ(__llvm_libc::strchr("123?", 'z'), nullptr);
}
-TEST(StrChrTest, TheSourceShouldNotChange) {
+TEST(LlvmLibcStrChrTest, TheSourceShouldNotChange) {
const char *src = "abcde";
// When the character is found, the source string should not change.
__llvm_libc::strchr(src, 'd');
@@ -63,7 +63,7 @@ TEST(StrChrTest, TheSourceShouldNotChange) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrChrTest, ShouldFindFirstOfDuplicates) {
+TEST(LlvmLibcStrChrTest, ShouldFindFirstOfDuplicates) {
// '1' is duplicated in the string, but it should find the first copy.
ASSERT_STREQ(__llvm_libc::strchr("abc1def1ghi", '1'), "1def1ghi");
@@ -72,7 +72,7 @@ TEST(StrChrTest, ShouldFindFirstOfDuplicates) {
ASSERT_STREQ(__llvm_libc::strchr(dups, 'X'), dups);
}
-TEST(StrChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
+TEST(LlvmLibcStrChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
// Null terminator should match.
ASSERT_STREQ(__llvm_libc::strchr("", '\0'), "");
// All other characters should not match.
diff --git a/libc/test/src/string/strcmp_test.cpp b/libc/test/src/string/strcmp_test.cpp
index 18e20a2b5637..f80cdfa3d44d 100644
--- a/libc/test/src/string/strcmp_test.cpp
+++ b/libc/test/src/string/strcmp_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strcmp.h"
#include "utils/UnitTest/Test.h"
-TEST(StrCmpTest, EmptyStringsShouldReturnZero) {
+TEST(LlvmLibcStrCmpTest, EmptyStringsShouldReturnZero) {
const char *s1 = "";
const char *s2 = "";
int result = __llvm_libc::strcmp(s1, s2);
@@ -20,7 +20,7 @@ TEST(StrCmpTest, EmptyStringsShouldReturnZero) {
ASSERT_EQ(result, 0);
}
-TEST(StrCmpTest, EmptyStringShouldNotEqualNonEmptyString) {
+TEST(LlvmLibcStrCmpTest, EmptyStringShouldNotEqualNonEmptyString) {
const char *empty = "";
const char *s2 = "abc";
int result = __llvm_libc::strcmp(empty, s2);
@@ -34,7 +34,7 @@ TEST(StrCmpTest, EmptyStringShouldNotEqualNonEmptyString) {
ASSERT_EQ(result, 49);
}
-TEST(StrCmpTest, EqualStringsShouldReturnZero) {
+TEST(LlvmLibcStrCmpTest, EqualStringsShouldReturnZero) {
const char *s1 = "abc";
const char *s2 = "abc";
int result = __llvm_libc::strcmp(s1, s2);
@@ -45,7 +45,7 @@ TEST(StrCmpTest, EqualStringsShouldReturnZero) {
ASSERT_EQ(result, 0);
}
-TEST(StrCmpTest, ShouldReturnResultOfFirstDifference) {
+TEST(LlvmLibcStrCmpTest, ShouldReturnResultOfFirstDifference) {
const char *s1 = "___B42__";
const char *s2 = "___C55__";
int result = __llvm_libc::strcmp(s1, s2);
@@ -58,7 +58,7 @@ TEST(StrCmpTest, ShouldReturnResultOfFirstDifference) {
ASSERT_EQ(result, 1);
}
-TEST(StrCmpTest, CapitalizedLetterShouldNotBeEqual) {
+TEST(LlvmLibcStrCmpTest, CapitalizedLetterShouldNotBeEqual) {
const char *s1 = "abcd";
const char *s2 = "abCd";
int result = __llvm_libc::strcmp(s1, s2);
@@ -71,7 +71,7 @@ TEST(StrCmpTest, CapitalizedLetterShouldNotBeEqual) {
ASSERT_EQ(result, -32);
}
-TEST(StrCmpTest, UnequalLengthStringsShouldNotReturnZero) {
+TEST(LlvmLibcStrCmpTest, UnequalLengthStringsShouldNotReturnZero) {
const char *s1 = "abc";
const char *s2 = "abcd";
int result = __llvm_libc::strcmp(s1, s2);
@@ -84,7 +84,7 @@ TEST(StrCmpTest, UnequalLengthStringsShouldNotReturnZero) {
ASSERT_EQ(result, 100);
}
-TEST(StrCmpTest, StringArgumentSwapChangesSign) {
+TEST(LlvmLibcStrCmpTest, StringArgumentSwapChangesSign) {
const char *a = "a";
const char *b = "b";
int result = __llvm_libc::strcmp(b, a);
diff --git a/libc/test/src/string/strcpy_test.cpp b/libc/test/src/string/strcpy_test.cpp
index 5a4b15aa94d0..14fa86c994d9 100644
--- a/libc/test/src/string/strcpy_test.cpp
+++ b/libc/test/src/string/strcpy_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strcpy.h"
#include "utils/UnitTest/Test.h"
-TEST(StrCpyTest, EmptyDest) {
+TEST(LlvmLibcStrCpyTest, EmptyDest) {
const char *abc = "abc";
char dest[4];
@@ -19,7 +19,7 @@ TEST(StrCpyTest, EmptyDest) {
ASSERT_STREQ(dest, abc);
}
-TEST(StrCpyTest, OffsetDest) {
+TEST(LlvmLibcStrCpyTest, OffsetDest) {
const char *abc = "abc";
char dest[7];
diff --git a/libc/test/src/string/strcspn_test.cpp b/libc/test/src/string/strcspn_test.cpp
index 80de495f9623..eb8d4276bf59 100644
--- a/libc/test/src/string/strcspn_test.cpp
+++ b/libc/test/src/string/strcspn_test.cpp
@@ -10,7 +10,7 @@
#include "utils/UnitTest/Test.h"
-TEST(StrCSpnTest, ComplementarySpanShouldNotGoPastNullTerminator) {
+TEST(LlvmLibcStrCSpnTest, ComplementarySpanShouldNotGoPastNullTerminator) {
const char src[5] = {'a', 'b', '\0', 'c', 'd'};
EXPECT_EQ(__llvm_libc::strcspn(src, "b"), size_t{1});
EXPECT_EQ(__llvm_libc::strcspn(src, "d"), size_t{2});
@@ -20,7 +20,7 @@ TEST(StrCSpnTest, ComplementarySpanShouldNotGoPastNullTerminator) {
EXPECT_EQ(__llvm_libc::strcspn("123", segment), size_t{0});
}
-TEST(StrCSpnTest, ComplementarySpanForEachIndividualCharacter) {
+TEST(LlvmLibcStrCSpnTest, ComplementarySpanForEachIndividualCharacter) {
const char *src = "12345";
// The complementary span size should increment accordingly.
EXPECT_EQ(__llvm_libc::strcspn(src, "1"), size_t{0});
@@ -30,7 +30,7 @@ TEST(StrCSpnTest, ComplementarySpanForEachIndividualCharacter) {
EXPECT_EQ(__llvm_libc::strcspn(src, "5"), size_t{4});
}
-TEST(StrCSpnTest, ComplementarySpanIsStringLengthIfNoCharacterFound) {
+TEST(LlvmLibcStrCSpnTest, ComplementarySpanIsStringLengthIfNoCharacterFound) {
// Null terminator.
EXPECT_EQ(__llvm_libc::strcspn("", ""), size_t{0});
EXPECT_EQ(__llvm_libc::strcspn("", "_"), size_t{0});
@@ -40,7 +40,7 @@ TEST(StrCSpnTest, ComplementarySpanIsStringLengthIfNoCharacterFound) {
EXPECT_EQ(__llvm_libc::strcspn("abc", "1"), size_t{3});
}
-TEST(StrCSpnTest, DuplicatedCharactersNotPartOfComplementarySpan) {
+TEST(LlvmLibcStrCSpnTest, DuplicatedCharactersNotPartOfComplementarySpan) {
// Complementary span should be zero in all these cases.
EXPECT_EQ(__llvm_libc::strcspn("a", "aa"), size_t{0});
EXPECT_EQ(__llvm_libc::strcspn("aa", "a"), size_t{0});
diff --git a/libc/test/src/string/strlen_test.cpp b/libc/test/src/string/strlen_test.cpp
index 1e148a546ad3..ab6d35562ac7 100644
--- a/libc/test/src/string/strlen_test.cpp
+++ b/libc/test/src/string/strlen_test.cpp
@@ -9,14 +9,14 @@
#include "src/string/strlen.h"
#include "utils/UnitTest/Test.h"
-TEST(StrLenTest, EmptyString) {
+TEST(LlvmLibcStrLenTest, EmptyString) {
const char *empty = "";
size_t result = __llvm_libc::strlen(empty);
ASSERT_EQ((size_t)0, result);
}
-TEST(StrLenTest, AnyString) {
+TEST(LlvmLibcStrLenTest, AnyString) {
const char *any = "Hello World!";
size_t result = __llvm_libc::strlen(any);
diff --git a/libc/test/src/string/strncpy_test.cpp b/libc/test/src/string/strncpy_test.cpp
index 814870613251..83f24d5c5ae8 100644
--- a/libc/test/src/string/strncpy_test.cpp
+++ b/libc/test/src/string/strncpy_test.cpp
@@ -11,7 +11,7 @@
#include "utils/UnitTest/Test.h"
#include <stddef.h> // For size_t.
-class StrncpyTest : public __llvm_libc::testing::Test {
+class LlvmLibcStrncpyTest : public __llvm_libc::testing::Test {
public:
void check_strncpy(__llvm_libc::cpp::MutableArrayRef<char> dst,
const __llvm_libc::cpp::ArrayRef<char> src, size_t n,
@@ -28,28 +28,28 @@ class StrncpyTest : public __llvm_libc::testing::Test {
}
};
-TEST_F(StrncpyTest, Untouched) {
+TEST_F(LlvmLibcStrncpyTest, Untouched) {
char dst[] = {'a', 'b'};
const char src[] = {'x', '\0'};
const char expected[] = {'a', 'b'};
check_strncpy(dst, src, 0, expected);
}
-TEST_F(StrncpyTest, CopyOne) {
+TEST_F(LlvmLibcStrncpyTest, CopyOne) {
char dst[] = {'a', 'b'};
const char src[] = {'x', 'y'};
const char expected[] = {'x', 'b'}; // no \0 is appended
check_strncpy(dst, src, 1, expected);
}
-TEST_F(StrncpyTest, CopyNull) {
+TEST_F(LlvmLibcStrncpyTest, CopyNull) {
char dst[] = {'a', 'b'};
const char src[] = {'\0', 'y'};
const char expected[] = {'\0', 'b'};
check_strncpy(dst, src, 1, expected);
}
-TEST_F(StrncpyTest, CopyPastSrc) {
+TEST_F(LlvmLibcStrncpyTest, CopyPastSrc) {
char dst[] = {'a', 'b'};
const char src[] = {'\0', 'y'};
const char expected[] = {'\0', '\0'};
diff --git a/libc/test/src/string/strnlen_test.cpp b/libc/test/src/string/strnlen_test.cpp
index b15ec2f8cef2..e7323077046f 100644
--- a/libc/test/src/string/strnlen_test.cpp
+++ b/libc/test/src/string/strnlen_test.cpp
@@ -10,14 +10,14 @@
#include "utils/UnitTest/Test.h"
#include <stddef.h>
-TEST(StrNLenTest, EmptyString) {
+TEST(LlvmLibcStrNLenTest, EmptyString) {
const char *empty = "";
ASSERT_EQ(static_cast<size_t>(0), __llvm_libc::strnlen(empty, 0));
// If N is greater than string length, this should still return 0.
ASSERT_EQ(static_cast<size_t>(0), __llvm_libc::strnlen(empty, 1));
}
-TEST(StrNLenTest, OneCharacterString) {
+TEST(LlvmLibcStrNLenTest, OneCharacterString) {
const char *single = "X";
ASSERT_EQ(static_cast<size_t>(1), __llvm_libc::strnlen(single, 1));
// If N is zero, this should return 0.
@@ -26,7 +26,7 @@ TEST(StrNLenTest, OneCharacterString) {
ASSERT_EQ(static_cast<size_t>(1), __llvm_libc::strnlen(single, 2));
}
-TEST(StrNLenTest, ManyCharacterString) {
+TEST(LlvmLibcStrNLenTest, ManyCharacterString) {
const char *many = "123456789";
ASSERT_EQ(static_cast<size_t>(9), __llvm_libc::strnlen(many, 9));
// If N is smaller than the string length, it should return N.
@@ -37,7 +37,7 @@ TEST(StrNLenTest, ManyCharacterString) {
ASSERT_EQ(static_cast<size_t>(9), __llvm_libc::strnlen(many, 42));
}
-TEST(StrNLenTest, CharactersAfterNullTerminatorShouldNotBeIncluded) {
+TEST(LlvmLibcStrNLenTest, CharactersAfterNullTerminatorShouldNotBeIncluded) {
const char str[5] = {'a', 'b', 'c', '\0', 'd'};
ASSERT_EQ(static_cast<size_t>(3), __llvm_libc::strnlen(str, 3));
// This should only read up to the null terminator.
diff --git a/libc/test/src/string/strpbrk_test.cpp b/libc/test/src/string/strpbrk_test.cpp
index 498e8473a890..8e28f14d6db1 100644
--- a/libc/test/src/string/strpbrk_test.cpp
+++ b/libc/test/src/string/strpbrk_test.cpp
@@ -10,23 +10,23 @@
#include "utils/UnitTest/Test.h"
-TEST(StrPBrkTest, EmptyStringShouldReturnNullptr) {
+TEST(LlvmLibcStrPBrkTest, EmptyStringShouldReturnNullptr) {
// The search should not include the null terminator.
EXPECT_STREQ(__llvm_libc::strpbrk("", ""), nullptr);
EXPECT_STREQ(__llvm_libc::strpbrk("_", ""), nullptr);
EXPECT_STREQ(__llvm_libc::strpbrk("", "_"), nullptr);
}
-TEST(StrPBrkTest, ShouldNotFindAnythingAfterNullTerminator) {
+TEST(LlvmLibcStrPBrkTest, ShouldNotFindAnythingAfterNullTerminator) {
const char src[4] = {'a', 'b', '\0', 'c'};
EXPECT_STREQ(__llvm_libc::strpbrk(src, "c"), nullptr);
}
-TEST(StrPBrkTest, ShouldReturnNullptrIfNoCharactersFound) {
+TEST(LlvmLibcStrPBrkTest, ShouldReturnNullptrIfNoCharactersFound) {
EXPECT_STREQ(__llvm_libc::strpbrk("12345", "abcdef"), nullptr);
}
-TEST(StrPBrkTest, FindsFirstCharacter) {
+TEST(LlvmLibcStrPBrkTest, FindsFirstCharacter) {
const char *src = "12345";
EXPECT_STREQ(__llvm_libc::strpbrk(src, "1"), "12345");
EXPECT_STREQ(__llvm_libc::strpbrk(src, "-1"), "12345");
@@ -35,7 +35,7 @@ TEST(StrPBrkTest, FindsFirstCharacter) {
ASSERT_STREQ(src, "12345");
}
-TEST(StrPBrkTest, FindsMiddleCharacter) {
+TEST(LlvmLibcStrPBrkTest, FindsMiddleCharacter) {
const char *src = "12345";
EXPECT_STREQ(__llvm_libc::strpbrk(src, "3"), "345");
EXPECT_STREQ(__llvm_libc::strpbrk(src, "?3"), "345");
@@ -44,7 +44,7 @@ TEST(StrPBrkTest, FindsMiddleCharacter) {
ASSERT_STREQ(src, "12345");
}
-TEST(StrPBrkTest, FindsLastCharacter) {
+TEST(LlvmLibcStrPBrkTest, FindsLastCharacter) {
const char *src = "12345";
EXPECT_STREQ(__llvm_libc::strpbrk(src, "5"), "5");
EXPECT_STREQ(__llvm_libc::strpbrk(src, "r5"), "5");
@@ -53,10 +53,10 @@ TEST(StrPBrkTest, FindsLastCharacter) {
ASSERT_STREQ(src, "12345");
}
-TEST(StrPBrkTest, FindsFirstOfRepeated) {
+TEST(LlvmLibcStrPBrkTest, FindsFirstOfRepeated) {
EXPECT_STREQ(__llvm_libc::strpbrk("A,B,C,D", ","), ",B,C,D");
}
-TEST(StrPBrkTest, FindsFirstInBreakset) {
+TEST(LlvmLibcStrPBrkTest, FindsFirstInBreakset) {
EXPECT_STREQ(__llvm_libc::strpbrk("12345", "34"), "345");
}
diff --git a/libc/test/src/string/strrchr_test.cpp b/libc/test/src/string/strrchr_test.cpp
index 5ed83aa64bfb..76fde8274bca 100644
--- a/libc/test/src/string/strrchr_test.cpp
+++ b/libc/test/src/string/strrchr_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strrchr.h"
#include "utils/UnitTest/Test.h"
-TEST(StrRChrTest, FindsFirstCharacter) {
+TEST(LlvmLibcStrRChrTest, FindsFirstCharacter) {
const char *src = "abcde";
// Should return original string since 'a' is the first character.
@@ -18,7 +18,7 @@ TEST(StrRChrTest, FindsFirstCharacter) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrRChrTest, FindsMiddleCharacter) {
+TEST(LlvmLibcStrRChrTest, FindsMiddleCharacter) {
const char *src = "abcde";
// Should return characters after (and including) 'c'.
@@ -27,7 +27,7 @@ TEST(StrRChrTest, FindsMiddleCharacter) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
+TEST(LlvmLibcStrRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
const char *src = "abcde";
// Should return 'e' and null-terminator.
@@ -36,7 +36,7 @@ TEST(StrRChrTest, FindsLastCharacterThatIsNotNullTerminator) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrRChrTest, FindsNullTerminator) {
+TEST(LlvmLibcStrRChrTest, FindsNullTerminator) {
const char *src = "abcde";
// Should return null terminator.
@@ -45,7 +45,7 @@ TEST(StrRChrTest, FindsNullTerminator) {
ASSERT_STREQ(src, "abcde");
}
-TEST(StrRChrTest, FindsLastBehindFirstNullTerminator) {
+TEST(LlvmLibcStrRChrTest, FindsLastBehindFirstNullTerminator) {
const char src[6] = {'a', 'a', '\0', 'b', '\0', 'c'};
// 'b' is behind a null terminator, so should not be found.
ASSERT_STREQ(__llvm_libc::strrchr(src, 'b'), nullptr);
@@ -56,12 +56,12 @@ TEST(StrRChrTest, FindsLastBehindFirstNullTerminator) {
ASSERT_STREQ(__llvm_libc::strrchr(src, 'a'), "a");
}
-TEST(StrRChrTest, CharacterNotWithinStringShouldReturnNullptr) {
+TEST(LlvmLibcStrRChrTest, CharacterNotWithinStringShouldReturnNullptr) {
// Since 'z' is not within the string, should return nullptr.
ASSERT_STREQ(__llvm_libc::strrchr("123?", 'z'), nullptr);
}
-TEST(StrRChrTest, ShouldFindLastOfDuplicates) {
+TEST(LlvmLibcStrRChrTest, ShouldFindLastOfDuplicates) {
// '1' is duplicated in the string, but it should find the last copy.
ASSERT_STREQ(__llvm_libc::strrchr("abc1def1ghi", '1'), "1ghi");
@@ -70,7 +70,7 @@ TEST(StrRChrTest, ShouldFindLastOfDuplicates) {
ASSERT_STREQ(__llvm_libc::strrchr(dups, 'X'), "X");
}
-TEST(StrRChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
+TEST(LlvmLibcStrRChrTest, EmptyStringShouldOnlyMatchNullTerminator) {
// Null terminator should match.
ASSERT_STREQ(__llvm_libc::strrchr("", '\0'), "");
// All other characters should not match.
diff --git a/libc/test/src/string/strspn_test.cpp b/libc/test/src/string/strspn_test.cpp
index edcfb1717e7e..6ada757773d1 100644
--- a/libc/test/src/string/strspn_test.cpp
+++ b/libc/test/src/string/strspn_test.cpp
@@ -10,14 +10,14 @@
#include "utils/UnitTest/Test.h"
-TEST(StrSpnTest, EmptyStringShouldReturnZeroLengthSpan) {
+TEST(LlvmLibcStrSpnTest, EmptyStringShouldReturnZeroLengthSpan) {
// The search should not include the null terminator.
EXPECT_EQ(__llvm_libc::strspn("", ""), size_t{0});
EXPECT_EQ(__llvm_libc::strspn("_", ""), size_t{0});
EXPECT_EQ(__llvm_libc::strspn("", "_"), size_t{0});
}
-TEST(StrSpnTest, ShouldNotSpanAnythingAfterNullTerminator) {
+TEST(LlvmLibcStrSpnTest, ShouldNotSpanAnythingAfterNullTerminator) {
const char src[4] = {'a', 'b', '\0', 'c'};
EXPECT_EQ(__llvm_libc::strspn(src, "ab"), size_t{2});
EXPECT_EQ(__llvm_libc::strspn(src, "c"), size_t{0});
@@ -27,7 +27,7 @@ TEST(StrSpnTest, ShouldNotSpanAnythingAfterNullTerminator) {
EXPECT_EQ(__llvm_libc::strspn("123", segment), size_t{2});
}
-TEST(StrSpnTest, SpanEachIndividualCharacter) {
+TEST(LlvmLibcStrSpnTest, SpanEachIndividualCharacter) {
const char *src = "12345";
EXPECT_EQ(__llvm_libc::strspn(src, "1"), size_t{1});
// Since '1' is not within the segment, the span
@@ -38,13 +38,13 @@ TEST(StrSpnTest, SpanEachIndividualCharacter) {
EXPECT_EQ(__llvm_libc::strspn(src, "5"), size_t{0});
}
-TEST(StrSpnTest, UnmatchedCharacterShouldNotBeCountedInSpan) {
+TEST(LlvmLibcStrSpnTest, UnmatchedCharacterShouldNotBeCountedInSpan) {
EXPECT_EQ(__llvm_libc::strspn("a", "b"), size_t{0});
EXPECT_EQ(__llvm_libc::strspn("abcdef", "1"), size_t{0});
EXPECT_EQ(__llvm_libc::strspn("123", "4"), size_t{0});
}
-TEST(StrSpnTest, SequentialCharactersShouldSpan) {
+TEST(LlvmLibcStrSpnTest, SequentialCharactersShouldSpan) {
const char *src = "abcde";
EXPECT_EQ(__llvm_libc::strspn(src, "a"), size_t{1});
EXPECT_EQ(__llvm_libc::strspn(src, "ab"), size_t{2});
@@ -59,14 +59,14 @@ TEST(StrSpnTest, SequentialCharactersShouldSpan) {
EXPECT_EQ(__llvm_libc::strspn("a", src), size_t{1});
}
-TEST(StrSpnTest, NonSequentialCharactersShouldNotSpan) {
+TEST(LlvmLibcStrSpnTest, NonSequentialCharactersShouldNotSpan) {
const char *src = "123456789";
EXPECT_EQ(__llvm_libc::strspn(src, "_1_abc_2_def_3_"), size_t{3});
// Only spans 4 since '5' is not within the span.
EXPECT_EQ(__llvm_libc::strspn(src, "67__34abc12"), size_t{4});
}
-TEST(StrSpnTest, ReverseCharacters) {
+TEST(LlvmLibcStrSpnTest, ReverseCharacters) {
// Since these are still sequential, this should span.
EXPECT_EQ(__llvm_libc::strspn("12345", "54321"), size_t{5});
// Does not span any since '1' is not within the span.
@@ -75,7 +75,7 @@ TEST(StrSpnTest, ReverseCharacters) {
EXPECT_EQ(__llvm_libc::strspn("12345", "51"), size_t{1});
}
-TEST(StrSpnTest, DuplicatedCharactersToBeSearchedForShouldStillMatch) {
+TEST(LlvmLibcStrSpnTest, DuplicatedCharactersToBeSearchedForShouldStillMatch) {
// Only a single character, so only spans 1.
EXPECT_EQ(__llvm_libc::strspn("a", "aa"), size_t{1});
// This should count once for each 'a' in the source string.
diff --git a/libc/test/src/string/strstr_test.cpp b/libc/test/src/string/strstr_test.cpp
index f4edbb2cca59..435ce896c97c 100644
--- a/libc/test/src/string/strstr_test.cpp
+++ b/libc/test/src/string/strstr_test.cpp
@@ -9,31 +9,31 @@
#include "src/string/strstr.h"
#include "utils/UnitTest/Test.h"
-TEST(StrStrTest, NeedleNotInHaystack) {
+TEST(LlvmLibcStrStrTest, NeedleNotInHaystack) {
const char *haystack = "12345";
const char *needle = "a";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), nullptr);
}
-TEST(StrStrTest, NeedleIsEmptyString) {
+TEST(LlvmLibcStrStrTest, NeedleIsEmptyString) {
const char *haystack = "12345";
const char *needle = "";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), haystack);
}
-TEST(StrStrTest, HaystackIsEmptyString) {
+TEST(LlvmLibcStrStrTest, HaystackIsEmptyString) {
const char *haystack = "";
const char *needle = "12345";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), nullptr);
}
-TEST(StrStrTest, HaystackAndNeedleAreEmptyStrings) {
+TEST(LlvmLibcStrStrTest, HaystackAndNeedleAreEmptyStrings) {
const char *haystack = "";
const char *needle = "";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "");
}
-TEST(StrStrTest, HaystackAndNeedleAreSingleCharacters) {
+TEST(LlvmLibcStrStrTest, HaystackAndNeedleAreSingleCharacters) {
const char *haystack = "a";
// Same characer returns that character.
ASSERT_STREQ(__llvm_libc::strstr(haystack, /*needle=*/"a"), "a");
@@ -41,69 +41,69 @@ TEST(StrStrTest, HaystackAndNeedleAreSingleCharacters) {
ASSERT_STREQ(__llvm_libc::strstr(haystack, /*needle=*/"b"), nullptr);
}
-TEST(StrStrTest, NeedleEqualToHaystack) {
+TEST(LlvmLibcStrStrTest, NeedleEqualToHaystack) {
const char *haystack = "12345";
const char *needle = "12345";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "12345");
}
-TEST(StrStrTest, NeedleSmallerThanHaystack) {
+TEST(LlvmLibcStrStrTest, NeedleSmallerThanHaystack) {
const char *haystack = "12345";
const char *needle = "345";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "345");
}
-TEST(StrStrTest, NeedleLargerThanHaystack) {
+TEST(LlvmLibcStrStrTest, NeedleLargerThanHaystack) {
const char *haystack = "123";
const char *needle = "12345";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), nullptr);
}
-TEST(StrStrTest, NeedleAtBeginning) {
+TEST(LlvmLibcStrStrTest, NeedleAtBeginning) {
const char *haystack = "12345";
const char *needle = "12";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "12345");
}
-TEST(StrStrTest, NeedleInMiddle) {
+TEST(LlvmLibcStrStrTest, NeedleInMiddle) {
const char *haystack = "abcdefghi";
const char *needle = "def";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "defghi");
}
-TEST(StrStrTest, NeedleDirectlyBeforeNullTerminator) {
+TEST(LlvmLibcStrStrTest, NeedleDirectlyBeforeNullTerminator) {
const char *haystack = "abcdefghi";
const char *needle = "ghi";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "ghi");
}
-TEST(StrStrTest, NeedlePastNullTerminator) {
+TEST(LlvmLibcStrStrTest, NeedlePastNullTerminator) {
const char haystack[5] = {'1', '2', '\0', '3', '4'};
// Shouldn't find anything after the null terminator.
ASSERT_STREQ(__llvm_libc::strstr(haystack, /*needle=*/"3"), nullptr);
ASSERT_STREQ(__llvm_libc::strstr(haystack, /*needle=*/"4"), nullptr);
}
-TEST(StrStrTest, PartialNeedle) {
+TEST(LlvmLibcStrStrTest, PartialNeedle) {
const char *haystack = "la_ap_lap";
const char *needle = "lap";
// Shouldn't find la or ap.
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "lap");
}
-TEST(StrStrTest, MisspelledNeedle) {
+TEST(LlvmLibcStrStrTest, MisspelledNeedle) {
const char *haystack = "atalloftwocities...wait, tale";
const char *needle = "tale";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "tale");
}
-TEST(StrStrTest, AnagramNeedle) {
+TEST(LlvmLibcStrStrTest, AnagramNeedle) {
const char *haystack = "dgo_ogd_god_odg_gdo_dog";
const char *needle = "dog";
ASSERT_STREQ(__llvm_libc::strstr(haystack, needle), "dog");
}
-TEST(StrStrTest, MorphedNeedle) {
+TEST(LlvmLibcStrStrTest, MorphedNeedle) {
// Changes a single letter in the needle to mismatch with the haystack.
const char *haystack = "once upon a time";
ASSERT_STREQ(__llvm_libc::strstr(haystack, "time"), "time");
diff --git a/libc/test/src/string/strtok_r_test.cpp b/libc/test/src/string/strtok_r_test.cpp
index 62df2f563a1b..35d4b91810a7 100644
--- a/libc/test/src/string/strtok_r_test.cpp
+++ b/libc/test/src/string/strtok_r_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strtok_r.h"
#include "utils/UnitTest/Test.h"
-TEST(StrTokReentrantTest, NoTokenFound) {
+TEST(LlvmLibcStrTokReentrantTest, NoTokenFound) {
{ // Empty source and delimiter string.
char empty[] = "";
char *reserve = nullptr;
@@ -44,7 +44,7 @@ TEST(StrTokReentrantTest, NoTokenFound) {
}
}
-TEST(StrTokReentrantTest, DelimiterAsFirstCharacterShouldBeIgnored) {
+TEST(LlvmLibcStrTokReentrantTest, DelimiterAsFirstCharacterShouldBeIgnored) {
char src[] = ".123";
char *reserve = nullptr;
ASSERT_STREQ(__llvm_libc::strtok_r(src, ".", &reserve), "123");
@@ -53,7 +53,7 @@ TEST(StrTokReentrantTest, DelimiterAsFirstCharacterShouldBeIgnored) {
ASSERT_STREQ(__llvm_libc::strtok_r(nullptr, ".", &reserve), nullptr);
}
-TEST(StrTokReentrantTest, DelimiterIsMiddleCharacter) {
+TEST(LlvmLibcStrTokReentrantTest, DelimiterIsMiddleCharacter) {
char src[] = "12,34";
char *reserve = nullptr;
ASSERT_STREQ(__llvm_libc::strtok_r(src, ",", &reserve), "12");
@@ -62,7 +62,7 @@ TEST(StrTokReentrantTest, DelimiterIsMiddleCharacter) {
ASSERT_STREQ(__llvm_libc::strtok_r(nullptr, ",", &reserve), nullptr);
}
-TEST(StrTokReentrantTest, DelimiterAsLastCharacterShouldBeIgnored) {
+TEST(LlvmLibcStrTokReentrantTest, DelimiterAsLastCharacterShouldBeIgnored) {
char src[] = "1234:";
char *reserve = nullptr;
ASSERT_STREQ(__llvm_libc::strtok_r(src, ":", &reserve), "1234");
@@ -71,7 +71,7 @@ TEST(StrTokReentrantTest, DelimiterAsLastCharacterShouldBeIgnored) {
ASSERT_STREQ(__llvm_libc::strtok_r(nullptr, ":", &reserve), nullptr);
}
-TEST(StrTokReentrantTest, ShouldNotGoPastNullTerminator) {
+TEST(LlvmLibcStrTokReentrantTest, ShouldNotGoPastNullTerminator) {
char src[] = {'1', '2', '\0', ',', '3'};
char *reserve = nullptr;
ASSERT_STREQ(__llvm_libc::strtok_r(src, ",", &reserve), "12");
@@ -80,7 +80,8 @@ TEST(StrTokReentrantTest, ShouldNotGoPastNullTerminator) {
ASSERT_STREQ(__llvm_libc::strtok_r(nullptr, ",", &reserve), nullptr);
}
-TEST(StrTokReentrantTest, SubsequentCallsShouldFindFollowingDelimiters) {
+TEST(LlvmLibcStrTokReentrantTest,
+ SubsequentCallsShouldFindFollowingDelimiters) {
char src[] = "12,34.56";
char *reserve = nullptr;
char *token = __llvm_libc::strtok_r(src, ",.", &reserve);
@@ -97,7 +98,7 @@ TEST(StrTokReentrantTest, SubsequentCallsShouldFindFollowingDelimiters) {
ASSERT_STREQ(token, nullptr);
}
-TEST(StrTokReentrantTest, DelimitersShouldNotBeIncludedInToken) {
+TEST(LlvmLibcStrTokReentrantTest, DelimitersShouldNotBeIncludedInToken) {
char src[] = "__ab__:_cd__:__ef__:__";
char *reserve = nullptr;
char *token = __llvm_libc::strtok_r(src, "_:", &reserve);
diff --git a/libc/test/src/string/strtok_test.cpp b/libc/test/src/string/strtok_test.cpp
index 311b9cf28fd4..65f8ac35fd79 100644
--- a/libc/test/src/string/strtok_test.cpp
+++ b/libc/test/src/string/strtok_test.cpp
@@ -9,7 +9,7 @@
#include "src/string/strtok.h"
#include "utils/UnitTest/Test.h"
-TEST(StrTokTest, NoTokenFound) {
+TEST(LlvmLibcStrTokTest, NoTokenFound) {
char empty[] = "";
ASSERT_STREQ(__llvm_libc::strtok(empty, ""), nullptr);
ASSERT_STREQ(__llvm_libc::strtok(empty, "_"), nullptr);
@@ -21,22 +21,22 @@ TEST(StrTokTest, NoTokenFound) {
ASSERT_STREQ(__llvm_libc::strtok(multiple, ":"), "1,2");
}
-TEST(StrTokTest, DelimiterAsFirstCharacterShouldBeIgnored) {
+TEST(LlvmLibcStrTokTest, DelimiterAsFirstCharacterShouldBeIgnored) {
char src[] = ".123";
ASSERT_STREQ(__llvm_libc::strtok(src, "."), "123");
}
-TEST(StrTokTest, DelimiterIsMiddleCharacter) {
+TEST(LlvmLibcStrTokTest, DelimiterIsMiddleCharacter) {
char src[] = "12,34";
ASSERT_STREQ(__llvm_libc::strtok(src, ","), "12");
}
-TEST(StrTokTest, DelimiterAsLastCharacterShouldBeIgnored) {
+TEST(LlvmLibcStrTokTest, DelimiterAsLastCharacterShouldBeIgnored) {
char src[] = "1234:";
ASSERT_STREQ(__llvm_libc::strtok(src, ":"), "1234");
}
-TEST(StrTokTest, MultipleDelimiters) {
+TEST(LlvmLibcStrTokTest, MultipleDelimiters) {
char src[] = "12,.34";
ASSERT_STREQ(__llvm_libc::strtok(src, "."), "12,");
ASSERT_STREQ(__llvm_libc::strtok(src, ".,"), "12");
@@ -44,12 +44,12 @@ TEST(StrTokTest, MultipleDelimiters) {
ASSERT_STREQ(__llvm_libc::strtok(src, ":,."), "12");
}
-TEST(StrTokTest, ShouldNotGoPastNullTerminator) {
+TEST(LlvmLibcStrTokTest, ShouldNotGoPastNullTerminator) {
char src[] = {'1', '2', '\0', ',', '3'};
ASSERT_STREQ(__llvm_libc::strtok(src, ","), "12");
}
-TEST(StrTokTest, SubsequentCallsShouldFindFollowingDelimiters) {
+TEST(LlvmLibcStrTokTest, SubsequentCallsShouldFindFollowingDelimiters) {
char src[] = "12,34.56";
char *token = __llvm_libc::strtok(src, ",.");
ASSERT_STREQ(token, "12");
@@ -65,7 +65,7 @@ TEST(StrTokTest, SubsequentCallsShouldFindFollowingDelimiters) {
ASSERT_STREQ(token, nullptr);
}
-TEST(StrTokTest, DelimitersShouldNotBeIncludedInToken) {
+TEST(LlvmLibcStrTokTest, DelimitersShouldNotBeIncludedInToken) {
char src[] = "__ab__:_cd__:__ef__:__";
char *token = __llvm_libc::strtok(src, "_:");
ASSERT_STREQ(token, "ab");
diff --git a/libc/test/src/sys/mman/linux/mmap_test.cpp b/libc/test/src/sys/mman/linux/mmap_test.cpp
index 8f91c2b548e0..5311427ad522 100644
--- a/libc/test/src/sys/mman/linux/mmap_test.cpp
+++ b/libc/test/src/sys/mman/linux/mmap_test.cpp
@@ -17,7 +17,7 @@
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
-TEST(MMapTest, NoError) {
+TEST(LlvmLibcMMapTest, NoError) {
size_t alloc_size = 128;
llvmlibc_errno = 0;
void *addr = __llvm_libc::mmap(nullptr, alloc_size, PROT_READ,
@@ -33,7 +33,7 @@ TEST(MMapTest, NoError) {
EXPECT_THAT(__llvm_libc::munmap(addr, alloc_size), Succeeds());
}
-TEST(MMapTest, Error_InvalidSize) {
+TEST(LlvmLibcMMapTest, Error_InvalidSize) {
llvmlibc_errno = 0;
void *addr = __llvm_libc::mmap(nullptr, 0, PROT_READ,
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
diff --git a/libc/test/src/threads/call_once_test.cpp b/libc/test/src/threads/call_once_test.cpp
index bb5f14899d9d..569c912378f2 100644
--- a/libc/test/src/threads/call_once_test.cpp
+++ b/libc/test/src/threads/call_once_test.cpp
@@ -32,7 +32,7 @@ static int func(void *) {
return 0;
}
-TEST(CallOnceTest, CallFrom5Threads) {
+TEST(LlvmLibcCallOnceTest, CallFrom5Threads) {
// Ensure the call count and thread count are 0 to begin with.
call_count = 0;
thread_count = 0;
@@ -73,7 +73,7 @@ static int once_func_caller(void *) {
// Test the synchronization aspect of the call_once function.
// This is not a fool proof test, but something which might be
// useful when we add a flakiness detection scheme to UnitTest.
-TEST(CallOnceTest, TestSynchronization) {
+TEST(LlvmLibcCallOnceTest, TestSynchronization) {
start_count = 0;
done_count = 0;
diff --git a/libc/test/src/threads/mtx_test.cpp b/libc/test/src/threads/mtx_test.cpp
index fc03d8a8957d..0f3df0ee0384 100644
--- a/libc/test/src/threads/mtx_test.cpp
+++ b/libc/test/src/threads/mtx_test.cpp
@@ -35,7 +35,7 @@ int counter(void *arg) {
return 0;
}
-TEST(MutexTest, RelayCounter) {
+TEST(LlvmLibcMutexTest, RelayCounter) {
ASSERT_EQ(__llvm_libc::mtx_init(&mutex, mtx_plain),
static_cast<int>(thrd_success));
@@ -79,7 +79,7 @@ int stepper(void *arg) {
return 0;
}
-TEST(MutexTest, WaitAndStep) {
+TEST(LlvmLibcMutexTest, WaitAndStep) {
ASSERT_EQ(__llvm_libc::mtx_init(&start_lock, mtx_plain),
static_cast<int>(thrd_success));
ASSERT_EQ(__llvm_libc::mtx_init(&step_lock, mtx_plain),
diff --git a/libc/test/src/threads/thrd_test.cpp b/libc/test/src/threads/thrd_test.cpp
index 1b0e54353dcf..ef4b25807674 100644
--- a/libc/test/src/threads/thrd_test.cpp
+++ b/libc/test/src/threads/thrd_test.cpp
@@ -18,7 +18,7 @@ static int thread_func(void *) {
return 0;
}
-TEST(ThreadTest, CreateAndJoin) {
+TEST(LlvmLibcThreadTest, CreateAndJoin) {
for (counter = 0; counter <= thread_count;) {
thrd_t thread;
int old_counter_val = counter;
@@ -33,7 +33,7 @@ TEST(ThreadTest, CreateAndJoin) {
static int return_arg(void *arg) { return *reinterpret_cast<int *>(arg); }
-TEST(ThreadTest, SpawnAndJoin) {
+TEST(LlvmLibcThreadTest, SpawnAndJoin) {
thrd_t thread_list[thread_count];
int args[thread_count];
diff --git a/libc/test/src/time/mktime_test.cpp b/libc/test/src/time/mktime_test.cpp
index 1e4b60a3bb17..7d4da70da7c5 100644
--- a/libc/test/src/time/mktime_test.cpp
+++ b/libc/test/src/time/mktime_test.cpp
@@ -35,36 +35,36 @@ static inline time_t call_mktime(struct tm *tm_data, int year, int month,
return __llvm_libc::mktime(tm_data);
}
-TEST(MkTime, FailureSetsErrno) {
+TEST(LlvmLibcMkTime, FailureSetsErrno) {
struct tm tm_data;
initialize_tm_data(&tm_data, 0, 0, 0, 0, 0, -1);
EXPECT_THAT(__llvm_libc::mktime(&tm_data), Fails(EOVERFLOW));
}
-TEST(MkTime, MktimeTestsInvalidSeconds) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidSeconds) {
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 0, 0, 0, -1), OutOfRangeReturnValue);
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 0, 0, 0, 60), OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidMinutes) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidMinutes) {
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 0, 0, -1, 0), OutOfRangeReturnValue);
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 1, 0, 60, 0), OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidHours) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidHours) {
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 0, -1, 0, 0), OutOfRangeReturnValue);
EXPECT_EQ(call_mktime(&tm_data, 0, 0, 0, 24, 0, 0), OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidYear) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidYear) {
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 1969, 0, 0, 0, 0, 0), OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidEndOf32BitEpochYear) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidEndOf32BitEpochYear) {
if (sizeof(time_t) != 4)
return;
struct tm tm_data;
@@ -88,7 +88,7 @@ TEST(MkTime, MktimeTestsInvalidEndOf32BitEpochYear) {
OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidMonths) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidMonths) {
struct tm tm_data;
// Before Jan of 1970
EXPECT_EQ(call_mktime(&tm_data, 1970, -1, 15, 0, 0, 0),
@@ -98,7 +98,7 @@ TEST(MkTime, MktimeTestsInvalidMonths) {
OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsInvalidDays) {
+TEST(LlvmLibcMkTime, MktimeTestsInvalidDays) {
struct tm tm_data;
// -1 day of Jan, 1970
EXPECT_EQ(call_mktime(&tm_data, 1970, 0, -1, 0, 0, 0), OutOfRangeReturnValue);
@@ -112,7 +112,7 @@ TEST(MkTime, MktimeTestsInvalidDays) {
EXPECT_EQ(call_mktime(&tm_data, 1970, 3, 31, 0, 0, 0), OutOfRangeReturnValue);
}
-TEST(MkTime, MktimeTestsStartEpochYear) {
+TEST(LlvmLibcMkTime, MktimeTestsStartEpochYear) {
// Thu Jan 1 00:00:00 1970
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 1970, 0, 1, 0, 0, 0), static_cast<time_t>(0));
@@ -120,7 +120,7 @@ TEST(MkTime, MktimeTestsStartEpochYear) {
EXPECT_EQ(0, tm_data.tm_yday);
}
-TEST(MkTime, MktimeTestsEpochYearRandomTime) {
+TEST(LlvmLibcMkTime, MktimeTestsEpochYearRandomTime) {
// Thu Jan 1 12:50:50 1970
struct tm tm_data;
EXPECT_EQ(call_mktime(&tm_data, 1970, 0, 1, 12, 50, 50),
@@ -129,7 +129,7 @@ TEST(MkTime, MktimeTestsEpochYearRandomTime) {
EXPECT_EQ(0, tm_data.tm_yday);
}
-TEST(MkTime, MktimeTestsEndOf32BitEpochYear) {
+TEST(LlvmLibcMkTime, MktimeTestsEndOf32BitEpochYear) {
struct tm tm_data;
// Test for maximum value of a signed 32-bit integer.
// Test implementation can encode time for Tue 19 January 2038 03:14:07 UTC.
@@ -139,7 +139,7 @@ TEST(MkTime, MktimeTestsEndOf32BitEpochYear) {
EXPECT_EQ(18, tm_data.tm_yday);
}
-TEST(MkTime, MktimeTests64BitYear) {
+TEST(LlvmLibcMkTime, MktimeTests64BitYear) {
if (sizeof(time_t) == 4)
return;
// Mon Jan 1 12:50:50 2170
diff --git a/libc/test/src/unistd/write_test.cpp b/libc/test/src/unistd/write_test.cpp
index a2c4cfca05c7..2313d97d5888 100644
--- a/libc/test/src/unistd/write_test.cpp
+++ b/libc/test/src/unistd/write_test.cpp
@@ -12,7 +12,7 @@
#include "utils/UnitTest/Test.h"
#include "utils/testutils/FDReader.h"
-TEST(UniStd, WriteBasic) {
+TEST(LlvmLibcUniStd, WriteBasic) {
using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
constexpr const char *hello = "hello";
__llvm_libc::testutils::FDReader reader;
@@ -20,7 +20,7 @@ TEST(UniStd, WriteBasic) {
EXPECT_TRUE(reader.matchWritten(hello));
}
-TEST(UniStd, WriteFails) {
+TEST(LlvmLibcUniStd, WriteFails) {
using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
EXPECT_THAT(__llvm_libc::write(-1, "", 1), Fails(EBADF));
diff --git a/libc/test/utils/CPP/bitset_test.cpp b/libc/test/utils/CPP/bitset_test.cpp
index 4613f941ceb8..66e608cec932 100644
--- a/libc/test/utils/CPP/bitset_test.cpp
+++ b/libc/test/utils/CPP/bitset_test.cpp
@@ -9,14 +9,14 @@
#include "utils/CPP/Bitset.h"
#include "utils/UnitTest/Test.h"
-TEST(BitsetTest, SetBitForSizeEqualToOne) {
+TEST(LlvmLibcBitsetTest, SetBitForSizeEqualToOne) {
__llvm_libc::cpp::Bitset<1> bitset;
EXPECT_FALSE(bitset.test(0));
bitset.set(0);
EXPECT_TRUE(bitset.test(0));
}
-TEST(BitsetTest, SetsBitsForSizeEqualToTwo) {
+TEST(LlvmLibcBitsetTest, SetsBitsForSizeEqualToTwo) {
__llvm_libc::cpp::Bitset<2> bitset;
bitset.set(0);
EXPECT_TRUE(bitset.test(0));
@@ -24,7 +24,7 @@ TEST(BitsetTest, SetsBitsForSizeEqualToTwo) {
EXPECT_TRUE(bitset.test(1));
}
-TEST(BitsetTest, SetsAllBitsForSizeLessThanEight) {
+TEST(LlvmLibcBitsetTest, SetsAllBitsForSizeLessThanEight) {
__llvm_libc::cpp::Bitset<7> bitset;
for (size_t i = 0; i < 7; ++i)
bitset.set(i);
@@ -33,7 +33,7 @@ TEST(BitsetTest, SetsAllBitsForSizeLessThanEight) {
EXPECT_TRUE(bitset.test(j));
}
-TEST(BitsetTest, SetsAllBitsForSizeLessThanSixteen) {
+TEST(LlvmLibcBitsetTest, SetsAllBitsForSizeLessThanSixteen) {
__llvm_libc::cpp::Bitset<15> bitset;
for (size_t i = 0; i < 15; ++i)
bitset.set(i);
@@ -42,7 +42,7 @@ TEST(BitsetTest, SetsAllBitsForSizeLessThanSixteen) {
EXPECT_TRUE(bitset.test(j));
}
-TEST(BitsetTest, SetsAllBitsForSizeLessThanThirtyTwo) {
+TEST(LlvmLibcBitsetTest, SetsAllBitsForSizeLessThanThirtyTwo) {
__llvm_libc::cpp::Bitset<31> bitset;
for (size_t i = 0; i < 31; ++i)
bitset.set(i);
@@ -51,7 +51,7 @@ TEST(BitsetTest, SetsAllBitsForSizeLessThanThirtyTwo) {
EXPECT_TRUE(bitset.test(j));
}
-TEST(BitsetTest, DefaultHasNoSetBits) {
+TEST(LlvmLibcBitsetTest, DefaultHasNoSetBits) {
__llvm_libc::cpp::Bitset<64> bitset;
for (size_t i = 0; i < 64; ++i) {
EXPECT_FALSE(bitset.test(i));
@@ -63,7 +63,7 @@ TEST(BitsetTest, DefaultHasNoSetBits) {
}
}
-TEST(BitsetTest, SettingBitXDoesNotSetBitY) {
+TEST(LlvmLibcBitsetTest, SettingBitXDoesNotSetBitY) {
for (size_t i = 0; i < 256; ++i) {
// Initialize within the loop to start with a fresh Bitset.
__llvm_libc::cpp::Bitset<256> bitset;
@@ -91,7 +91,7 @@ TEST(BitsetTest, SettingBitXDoesNotSetBitY) {
}
}
-TEST(BitsetTest, SettingBitXDoesNotResetBitY) {
+TEST(LlvmLibcBitsetTest, SettingBitXDoesNotResetBitY) {
__llvm_libc::cpp::Bitset<128> bitset;
for (size_t i = 0; i < 128; ++i)
bitset.set(i);
diff --git a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
index c4f64a095fc3..d43a92801f4f 100644
--- a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
+++ b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
@@ -67,7 +67,9 @@ class WrapperGenTest : public ::testing::Test {
}
};
-TEST_F(WrapperGenTest, RunWrapperGenAndGetNoErrors) {
+using LlvmLibcWrapperGenTest = WrapperGenTest;
+
+TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenAndGetNoErrors) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -89,7 +91,7 @@ TEST_F(WrapperGenTest, RunWrapperGenAndGetNoErrors) {
ASSERT_EQ(STDErrOutput, "");
}
-TEST_F(WrapperGenTest, RunWrapperGenOnStrlen) {
+TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlen) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -124,7 +126,7 @@ TEST_F(WrapperGenTest, RunWrapperGenOnStrlen) {
// would break this test.
}
-TEST_F(WrapperGenTest, GenAliasForStrlen) {
+TEST_F(LlvmLibcWrapperGenTest, GenAliasForStrlen) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -160,7 +162,7 @@ TEST_F(WrapperGenTest, GenAliasForStrlen) {
// would break this test.
}
-TEST_F(WrapperGenTest, DeclStrlenAliasUsingMangledNameFile) {
+TEST_F(LlvmLibcWrapperGenTest, DeclStrlenAliasUsingMangledNameFile) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -212,7 +214,8 @@ TEST_F(WrapperGenTest, DeclStrlenAliasUsingMangledNameFile) {
// return errors
/////////////////////////////////////////////////////////////////////
-TEST_F(WrapperGenTest, RunWrapperGenOnStrlenWithMangledNameAndMangledNameFile) {
+TEST_F(LlvmLibcWrapperGenTest,
+ RunWrapperGenOnStrlenWithMangledNameAndMangledNameFile) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -246,7 +249,7 @@ TEST_F(WrapperGenTest, RunWrapperGenOnStrlenWithMangledNameAndMangledNameFile) {
ASSERT_EQ(STDOutOutput, "");
}
-TEST_F(WrapperGenTest, RunWrapperGenOnBadFuncName) {
+TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnBadFuncName) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -278,7 +281,7 @@ TEST_F(WrapperGenTest, RunWrapperGenOnBadFuncName) {
ASSERT_EQ(STDOutOutput, "");
}
-TEST_F(WrapperGenTest, RunWrapperGenOnStrlenWithBadMangledNameFile) {
+TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlenWithBadMangledNameFile) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -312,7 +315,7 @@ TEST_F(WrapperGenTest, RunWrapperGenOnStrlenWithBadMangledNameFile) {
ASSERT_EQ(STDOutOutput, "");
}
-TEST_F(WrapperGenTest, RunWithMangledNameFileMissingLLVMLibcName) {
+TEST_F(LlvmLibcWrapperGenTest, RunWithMangledNameFileMissingLLVMLibcName) {
llvm::Optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
diff --git a/libc/utils/UnitTest/LibcTest.h b/libc/utils/UnitTest/LibcTest.h
index 059310570832..adf86da7f4b5 100644
--- a/libc/utils/UnitTest/LibcTest.h
+++ b/libc/utils/UnitTest/LibcTest.h
@@ -134,7 +134,20 @@ class Test {
} // namespace testing
} // namespace __llvm_libc
+namespace __llvm_libc {
+namespace internal {
+constexpr bool same_prefix(char const *lhs, char const *rhs, int const len) {
+ for (int i = 0; (*lhs || *rhs) && (i < len); ++lhs, ++rhs, ++i)
+ if (*lhs != *rhs)
+ return false;
+ return true;
+}
+} // namespace internal
+} // namespace __llvm_libc
+
#define TEST(SuiteName, TestName) \
+ static_assert(__llvm_libc::internal::same_prefix(#SuiteName, "LlvmLibc", 8), \
+ "All LLVM-libc TEST suite names must start with 'LlvmLibc'."); \
class SuiteName##_##TestName : public __llvm_libc::testing::Test { \
public: \
SuiteName##_##TestName() { addTest(this); } \
@@ -145,6 +158,9 @@ class Test {
void SuiteName##_##TestName::Run()
#define TEST_F(SuiteClass, TestName) \
+ static_assert( \
+ __llvm_libc::internal::same_prefix(#SuiteClass, "LlvmLibc", 8), \
+ "All LLVM-libc TEST_F suite class names must start with 'LlvmLibc'."); \
class SuiteClass##_##TestName : public SuiteClass { \
public: \
SuiteClass##_##TestName() { addTest(this); } \
More information about the libc-commits
mailing list