diff options
Diffstat (limited to 'googlemock/test/gmock-nice-strict_test.cc')
-rw-r--r-- | googlemock/test/gmock-nice-strict_test.cc | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index d00f453..5f8f961 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -114,23 +114,22 @@ class MockBar { GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar); }; -#if GTEST_GTEST_LANG_CXX11 class MockBaz { public: class MoveOnly { + public: MoveOnly() = default; MoveOnly(const MoveOnly&) = delete; - operator=(const MoveOnly&) = delete; + MoveOnly& operator=(const MoveOnly&) = delete; MoveOnly(MoveOnly&&) = default; - operator=(MoveOnly&&) = default; + MoveOnly& operator=(MoveOnly&&) = default; }; MockBaz(MoveOnly) {} -} -#endif // GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ +}; #if GTEST_HAS_STREAM_REDIRECTION @@ -292,14 +291,10 @@ TEST(NiceMockTest, AllowLeak) { leaked->DoThis(); } -#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - TEST(NiceMockTest, MoveOnlyConstructor) { - NiceMock<MockBaz> nice_baz(MockBaz::MoveOnly()); + NiceMock<MockBaz> nice_baz(MockBaz::MoveOnly{}); } -#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - #if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE // Tests that NiceMock<Mock> compiles where Mock is a user-defined // class (as opposed to ::testing::Mock). We had to work around an @@ -407,14 +402,10 @@ TEST(NaggyMockTest, AllowLeak) { leaked->DoThis(); } -#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - TEST(NaggyMockTest, MoveOnlyConstructor) { - NaggyMock<MockBaz> naggy_baz(MockBaz::MoveOnly()); + NaggyMock<MockBaz> naggy_baz(MockBaz::MoveOnly{}); } -#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - #if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE // Tests that NaggyMock<Mock> compiles where Mock is a user-defined // class (as opposed to ::testing::Mock). We had to work around an @@ -503,14 +494,10 @@ TEST(StrictMockTest, AllowLeak) { leaked->DoThis(); } -#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - TEST(StrictMockTest, MoveOnlyConstructor) { - StrictMock<MockBaz> strict_baz(MockBaz::MoveOnly()); + StrictMock<MockBaz> strict_baz(MockBaz::MoveOnly{}); } -#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_ - #if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE // Tests that StrictMock<Mock> compiles where Mock is a user-defined // class (as opposed to ::testing::Mock). We had to work around an |