[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 13978ac531e4b45808a1729225bfdbf6a051fa2a..6d35943f0d68476ed4d02a48495abda5c0c33d00 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); }