gtest_prod.h (googletest-release-1.11.0) | : | gtest_prod.h (googletest-release-1.12.0) | ||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
// | // Google C++ Testing and Mocking Framework definitions useful in production | |||
// Google C++ Testing and Mocking Framework definitions useful in production cod | // code. | |||
e. | ||||
// GOOGLETEST_CM0003 DO NOT DELETE | ||||
#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | #ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | |||
#define GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | #define GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | |||
// When you need to test the private or protected members of a class, | // When you need to test the private or protected members of a class, | |||
// use the FRIEND_TEST macro to declare your tests as friends of the | // use the FRIEND_TEST macro to declare your tests as friends of the | |||
// class. For example: | // class. For example: | |||
// | // | |||
// class MyClass { | // class MyClass { | |||
// private: | // private: | |||
skipping to change at line 58 | skipping to change at line 57 | |||
// // ... | // // ... | |||
// }; | // }; | |||
// | // | |||
// TEST_F(MyClassTest, PrivateMethodWorks) { | // TEST_F(MyClassTest, PrivateMethodWorks) { | |||
// // Can call MyClass::PrivateMethod() here. | // // Can call MyClass::PrivateMethod() here. | |||
// } | // } | |||
// | // | |||
// Note: The test class must be in the same namespace as the class being tested. | // Note: The test class must be in the same namespace as the class being tested. | |||
// For example, putting MyClassTest in an anonymous namespace will not work. | // For example, putting MyClassTest in an anonymous namespace will not work. | |||
#define FRIEND_TEST(test_case_name, test_name)\ | #define FRIEND_TEST(test_case_name, test_name) \ | |||
friend class test_case_name##_##test_name##_Test | friend class test_case_name##_##test_name##_Test | |||
#endif // GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | #endif // GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_ | |||
End of changes. 2 change blocks. | ||||
6 lines changed or deleted | 4 lines changed or added |