From bcb12fa0f651f7de3a10f4535ed856e52b1c3f62 Mon Sep 17 00:00:00 2001 From: shiqian Date: Fri, 1 Aug 2008 19:04:48 +0000 Subject: Fixes the definition of GTEST_ATTRIBUTE_UNUSED and make the tests pass in opt mode. --- test/gtest_repeat_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/gtest_repeat_test.cc') diff --git a/test/gtest_repeat_test.cc b/test/gtest_repeat_test.cc index fa52442f..e2f03812 100644 --- a/test/gtest_repeat_test.cc +++ b/test/gtest_repeat_test.cc @@ -58,6 +58,8 @@ using testing::GTEST_FLAG(repeat); namespace { +// We need this when we are testing Google Test itself and therefore +// cannot use Google Test assertions. #define GTEST_CHECK_INT_EQ_(expected, actual) \ do {\ const int expected_val = (expected);\ @@ -130,8 +132,6 @@ void ResetCounts() { // Checks that the count for each test is expected. void CheckCounts(int expected) { - // We cannot use Google Test assertions here since we are testing Google Test - // itself. GTEST_CHECK_INT_EQ_(expected, g_environment_set_up_count); GTEST_CHECK_INT_EQ_(expected, g_environment_tear_down_count); GTEST_CHECK_INT_EQ_(expected, g_should_fail_count); -- cgit v1.2.3