1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_ALLOCATOR_DISPATCHER_TESTING_DISPATCHER_TEST_H_ 6 #define BASE_ALLOCATOR_DISPATCHER_TESTING_DISPATCHER_TEST_H_ 7 8 #include "testing/gtest/include/gtest/gtest.h" 9 10 namespace base::allocator::dispatcher::testing { 11 12 // DispatcherTest provides some common initialization which most of the 13 // unittests of the dispatcher require. DispatcherTest should not be used 14 // directly. Instead, derive your test fixture from it. 15 struct DispatcherTest : public ::testing::Test { 16 // Perform some commonly required initialization, at them moment 17 // - Initialize the TLS slot for the ReentryGuard 18 DispatcherTest(); 19 20 protected: 21 // Protected d'tor only to prevent direct usage of this class. 22 ~DispatcherTest() override; 23 }; 24 25 } // namespace base::allocator::dispatcher::testing 26 27 #endif // BASE_ALLOCATOR_DISPATCHER_TESTING_DISPATCHER_TEST_H_