[compiler-rt] b27f657 - [GWP-ASan] Stop using type aliases for ::testing:: types

Alex Brachet via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 10:52:45 PST 2023


Author: Alex Brachet
Date: 2023-03-01T18:49:18Z
New Revision: b27f657f89c605f635f79ebcbacd8a729f8e1bff

URL: https://github.com/llvm/llvm-project/commit/b27f657f89c605f635f79ebcbacd8a729f8e1bff
DIFF: https://github.com/llvm/llvm-project/commit/b27f657f89c605f635f79ebcbacd8a729f8e1bff.diff

LOG: [GWP-ASan] Stop using type aliases for ::testing:: types

Added: 
    

Modified: 
    compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp
    compiler-rt/lib/gwp_asan/tests/harness.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp b/compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp
index 598b7b8789295..d270ed8f3c416 100644
--- a/compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp
+++ b/compiler-rt/lib/gwp_asan/tests/crash_handler_api.cpp
@@ -16,7 +16,7 @@ using GuardedPoolAllocator = gwp_asan::GuardedPoolAllocator;
 using AllocationMetadata = gwp_asan::AllocationMetadata;
 using AllocatorState = gwp_asan::AllocatorState;
 
-class CrashHandlerAPITest : public Test {
+class CrashHandlerAPITest : public ::testing::Test {
 public:
   void SetUp() override { setupState(); }
 

diff  --git a/compiler-rt/lib/gwp_asan/tests/harness.h b/compiler-rt/lib/gwp_asan/tests/harness.h
index 89f4e11013394..712953920449f 100644
--- a/compiler-rt/lib/gwp_asan/tests/harness.h
+++ b/compiler-rt/lib/gwp_asan/tests/harness.h
@@ -13,12 +13,9 @@
 
 #if defined(__Fuchsia__)
 #include <zxtest/zxtest.h>
-using Test = ::zxtest::Test;
-template <typename T> using TestWithParam = ::zxtest::TestWithParam<T>;
+namespace testing = zxtest;
 #else
 #include "gtest/gtest.h"
-using Test = ::testing::Test;
-template <typename T> using TestWithParam = ::testing::TestWithParam<T>;
 #endif
 
 #include "gwp_asan/guarded_pool_allocator.h"
@@ -48,7 +45,7 @@ void TouchMemory(void *Ptr);
 
 void CheckOnlyOneGwpAsanCrash(const std::string &OutputBuffer);
 
-class DefaultGuardedPoolAllocator : public Test {
+class DefaultGuardedPoolAllocator : public ::testing::Test {
 public:
   void SetUp() override {
     gwp_asan::options::Options Opts;
@@ -67,7 +64,7 @@ class DefaultGuardedPoolAllocator : public Test {
       MaxSimultaneousAllocations;
 };
 
-class CustomGuardedPoolAllocator : public Test {
+class CustomGuardedPoolAllocator : public ::testing::Test {
 public:
   void
   InitNumSlots(decltype(gwp_asan::options::Options::MaxSimultaneousAllocations)
@@ -91,7 +88,7 @@ class CustomGuardedPoolAllocator : public Test {
 };
 
 class BacktraceGuardedPoolAllocator
-    : public TestWithParam</* Recoverable */ bool> {
+    : public ::testing::TestWithParam</* Recoverable */ bool> {
 public:
   void SetUp() override {
     gwp_asan::options::Options Opts;


        


More information about the llvm-commits mailing list