diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-15 16:11:41 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-15 16:32:35 +0100 |
commit | d94f158aa6a1faa0f0825f333769617dd1269e9f (patch) | |
tree | 80954989318559133fd444ee7ee3be78cff90887 /include/gtest/gtest_prod.h | |
parent | 42552c3316326dfd84e8285672b33b78a1a6a4ee (diff) |
Diffstat (limited to 'include/gtest/gtest_prod.h')
-rw-r--r-- | include/gtest/gtest_prod.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/gtest/gtest_prod.h b/include/gtest/gtest_prod.h index da80ddc..e651671 100644 --- a/include/gtest/gtest_prod.h +++ b/include/gtest/gtest_prod.h @@ -26,10 +26,10 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + // -// Author: wan@google.com (Zhanyong Wan) -// -// Google C++ Testing Framework definitions useful in production code. +// Google C++ Testing and Mocking Framework definitions useful in production code. +// GOOGLETEST_CM0003 DO NOT DELETE #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ @@ -40,17 +40,20 @@ // // class MyClass { // private: -// void MyMethod(); -// FRIEND_TEST(MyClassTest, MyMethod); +// void PrivateMethod(); +// FRIEND_TEST(MyClassTest, PrivateMethodWorks); // }; // // class MyClassTest : public testing::Test { // // ... // }; // -// TEST_F(MyClassTest, MyMethod) { -// // Can call MyClass::MyMethod() here. +// TEST_F(MyClassTest, PrivateMethodWorks) { +// // Can call MyClass::PrivateMethod() here. // } +// +// 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. #define FRIEND_TEST(test_case_name, test_name)\ friend class test_case_name##_##test_name##_Test |