1 // Copyright (C) 2018 Intel Corporation
3 // SPDX-License-Identifier: Apache-2.0
6 #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
7 #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
9 // When you need to test the private or protected members of a class,
10 // use the FRIEND_TEST macro to declare your tests as friends of the
11 // class. For example:
16 // FRIEND_TEST(MyClassTest, MyMethod);
19 // class MyClassTest : public testing::Test {
23 // TEST_F(MyClassTest, MyMethod) {
24 // // Can call MyClass::MyMethod() here.
27 #define FRIEND_TEST(test_case_name, test_name)\
28 friend class test_case_name##_##test_name##_Test
30 #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_