summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorGennadiy Rozental <rogeeff@google.com>2019-11-26 20:47:38 (GMT)
committerGennadiy Rozental <rogeeff@google.com>2019-11-26 20:47:38 (GMT)
commit39803f3c51d246dfccb134eabff3e3938aa6f2af (patch)
tree3cf799aef80762f94cf7c28dd109eca27144e855 /googlemock
parent0361bdf591dd36d488b9d026f6f6cbd52593036e (diff)
parent21d276b5c42d77de89477ff549cfdfda079ab0e3 (diff)
downloadgoogletest-39803f3c51d246dfccb134eabff3e3938aa6f2af.zip
googletest-39803f3c51d246dfccb134eabff3e3938aa6f2af.tar.gz
googletest-39803f3c51d246dfccb134eabff3e3938aa6f2af.tar.bz2
Merge pull request #2593 from kuzkry:remove-workaround_msvc-namespace-scope-from-nested-class
PiperOrigin-RevId: 282593823
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/test/gmock-matchers_test.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index c2c3abd..e6e8c8f 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -2988,18 +2988,13 @@ TEST(MatcherAssertionTest, WorksWhenMatcherIsNotSatisfied) {
static unsigned short n; // NOLINT
n = 5;
- // VC++ prior to version 8.0 SP1 has a bug where it will not see any
- // functions declared in the namespace scope from within nested classes.
- // EXPECT/ASSERT_(NON)FATAL_FAILURE macros use nested classes so that all
- // namespace-level functions invoked inside them need to be explicitly
- // resolved.
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Gt(10)),
+ EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Gt(10)),
"Value of: n\n"
"Expected: is > 10\n"
" Actual: 5" + OfType("unsigned short"));
n = 0;
EXPECT_NONFATAL_FAILURE(
- EXPECT_THAT(n, ::testing::AllOf(::testing::Le(7), ::testing::Ge(5))),
+ EXPECT_THAT(n, AllOf(Le(7), Ge(5))),
"Value of: n\n"
"Expected: (is <= 7) and (is >= 5)\n"
" Actual: 0" + OfType("unsigned short"));
@@ -3013,11 +3008,11 @@ TEST(MatcherAssertionTest, WorksForByRefArguments) {
static int n;
n = 0;
EXPECT_THAT(n, AllOf(Le(7), Ref(n)));
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Not(::testing::Ref(n))),
+ EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Not(Ref(n))),
"Value of: n\n"
"Expected: does not reference the variable @");
// Tests the "Actual" part.
- EXPECT_FATAL_FAILURE(ASSERT_THAT(n, ::testing::Not(::testing::Ref(n))),
+ EXPECT_FATAL_FAILURE(ASSERT_THAT(n, Not(Ref(n))),
"Actual: 0" + OfType("int") + ", which is located @");
}