Blame nss/external_tests/google_test/gtest/include/gtest/gtest_prod.h

Packit 40b132
// Copyright 2006, Google Inc.
Packit 40b132
// All rights reserved.
Packit 40b132
//
Packit 40b132
// Redistribution and use in source and binary forms, with or without
Packit 40b132
// modification, are permitted provided that the following conditions are
Packit 40b132
// met:
Packit 40b132
//
Packit 40b132
//     * Redistributions of source code must retain the above copyright
Packit 40b132
// notice, this list of conditions and the following disclaimer.
Packit 40b132
//     * Redistributions in binary form must reproduce the above
Packit 40b132
// copyright notice, this list of conditions and the following disclaimer
Packit 40b132
// in the documentation and/or other materials provided with the
Packit 40b132
// distribution.
Packit 40b132
//     * Neither the name of Google Inc. nor the names of its
Packit 40b132
// contributors may be used to endorse or promote products derived from
Packit 40b132
// this software without specific prior written permission.
Packit 40b132
//
Packit 40b132
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit 40b132
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit 40b132
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Packit 40b132
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Packit 40b132
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Packit 40b132
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Packit 40b132
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit 40b132
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit 40b132
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit 40b132
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 40b132
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 40b132
//
Packit 40b132
// Author: wan@google.com (Zhanyong Wan)
Packit 40b132
//
Packit 40b132
// Google C++ Testing Framework definitions useful in production code.
Packit 40b132
Packit 40b132
#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
Packit 40b132
#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
Packit 40b132
Packit 40b132
// When you need to test the private or protected members of a class,
Packit 40b132
// use the FRIEND_TEST macro to declare your tests as friends of the
Packit 40b132
// class.  For example:
Packit 40b132
//
Packit 40b132
// class MyClass {
Packit 40b132
//  private:
Packit 40b132
//   void MyMethod();
Packit 40b132
//   FRIEND_TEST(MyClassTest, MyMethod);
Packit 40b132
// };
Packit 40b132
//
Packit 40b132
// class MyClassTest : public testing::Test {
Packit 40b132
//   // ...
Packit 40b132
// };
Packit 40b132
//
Packit 40b132
// TEST_F(MyClassTest, MyMethod) {
Packit 40b132
//   // Can call MyClass::MyMethod() here.
Packit 40b132
// }
Packit 40b132
Packit 40b132
#define FRIEND_TEST(test_case_name, test_name)\
Packit 40b132
friend class test_case_name##_##test_name##_Test
Packit 40b132
Packit 40b132
#endif  // GTEST_INCLUDE_GTEST_GTEST_PROD_H_