aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortsunanet <tsunanet@861a406c-534a-0410-8894-cb66d6ee9925>2009-05-18 20:53:57 +0000
committertsunanet <tsunanet@861a406c-534a-0410-8894-cb66d6ee9925>2009-05-18 20:53:57 +0000
commit8de91f8f8374f49240b379e2328de9121837bae8 (patch)
treef9a5623027238007ae85da60f05ff60b68b0a53a /test
parentc8a0482c0bffe471a82d8513536aa87235cb523f (diff)
downloadgoogletest-8de91f8f8374f49240b379e2328de9121837bae8.tar.gz
googletest-8de91f8f8374f49240b379e2328de9121837bae8.tar.bz2
googletest-8de91f8f8374f49240b379e2328de9121837bae8.zip
Change a few visibilities to work around a bug in g++ 3.4.2.
It looks like this version of g++ is confused by the local class generated by the TEST_F macro and it can't tell that we're in a method that inherits the class we want to access. This bug causes the following kind of error: ../samples/../test/gtest_unittest.cc: In static member function `static void <unnamed>::ExpectFatalFailureTest_CatchesFatalFaliure_Test::TestBody()::GTestExpectFatalFailureHelper::Execute()': ../samples/../test/gtest_unittest.cc:799: error: `static void <unnamed>::ScopedFakeTestPartResultReporterTest::AddFailure(<unnamed>::ScopedFakeTestPartResultReporterTest::FailureMode)' is protected ../samples/../test/gtest_unittest.cc:883: error: within this context Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/gtest_output_test_.cc2
-rw-r--r--test/gtest_unittest.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc
index 0e49f6c3..6d42ad80 100644
--- a/test/gtest_output_test_.cc
+++ b/test/gtest_output_test_.cc
@@ -808,7 +808,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, ATypeParamDeathTest, NumericTypes);
// Tests various failure conditions of
// EXPECT_{,NON}FATAL_FAILURE{,_ON_ALL_THREADS}.
class ExpectFailureTest : public testing::Test {
- protected:
+ public: // Must be public and not protected due to a bug in g++ 3.4.2.
enum FailureMode {
FATAL_FAILURE,
NONFATAL_FAILURE
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index 8becca15..878aa23c 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -827,7 +827,7 @@ static void AddNonfatalFailure() {
}
class ScopedFakeTestPartResultReporterTest : public Test {
- protected:
+ public: // Must be public and not protected due to a bug in g++ 3.4.2.
enum FailureMode {
FATAL_FAILURE,
NONFATAL_FAILURE
@@ -2701,7 +2701,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, DISABLED_TypedTestP, NumericTypes);
// Tests that assertion macros evaluate their arguments exactly once.
class SingleEvaluationTest : public Test {
- public:
+ public: // Must be public and not protected due to a bug in g++ 3.4.2.
// This helper function is needed by the FailedASSERT_STREQ test
// below. It's public to work around C++Builder's bug with scoping local
// classes.