[libc] Make div test names unique
authorAlex Brachet <abrachet@google.com>
Thu, 7 Jul 2022 15:06:52 +0000 (15:06 +0000)
committerAlex Brachet <abrachet@google.com>
Thu, 7 Jul 2022 15:06:52 +0000 (15:06 +0000)
In Fuchsia, all tests in a directory, ie stdlib, are linked
into one executable, this causes problems for multiple
definitions of the vtables of the div tests because their
class has the same name. This patch just trivially changes
their name to be unique between all div tests.

Differential revision: https://reviews.llvm.org/D129248

libc/test/src/stdlib/DivTest.h

index 13978ac..6d35943 100644 (file)
@@ -34,4 +34,4 @@ public:
 
 #define LIST_DIV_TESTS(IntType, ReturnType, func)                              \
   using LlvmLibcDivTest = DivTest<IntType, ReturnType>;                        \
-  TEST_F(LlvmLibcDivTest, SimpleTest) { simpleTest(func); }
+  TEST_F(LlvmLibcDivTest, SimpleTest##ReturnType) { simpleTest(func); }