summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gtest.cc6
-rw-r--r--test/gtest_unittest.cc9
2 files changed, 5 insertions, 10 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index 57719aa..d6552f2 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -182,6 +182,10 @@ bool g_help_flag = false;
} // namespace internal
+static const char* GetDefaultFilter() {
+ return kUniversalFilter;
+}
+
GTEST_DEFINE_bool_(
also_run_disabled_tests,
internal::BoolFromGTestEnv("also_run_disabled_tests", false),
@@ -208,7 +212,7 @@ GTEST_DEFINE_string_(
GTEST_DEFINE_string_(
filter,
- internal::StringFromGTestEnv("filter", kUniversalFilter),
+ internal::StringFromGTestEnv("filter", GetDefaultFilter()),
"A colon-separated list of glob (not regex) patterns "
"for filtering the tests to run, optionally followed by a "
"'-' and a : separated list of negative patterns (tests to "
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index 5aec883..0cab07d 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -512,15 +512,6 @@ TEST(NullLiteralTest, IsTrueForNullLiterals) {
EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0));
EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0U));
EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(0L));
-
-# ifndef __BORLANDC__
-
- // Some compilers may fail to detect some null pointer literals;
- // as long as users of the framework don't use such literals, this
- // is harmless.
- EXPECT_TRUE(GTEST_IS_NULL_LITERAL_(1 - 1));
-
-# endif
}
// Tests that GTEST_IS_NULL_LITERAL_(x) is false when x is not a null