diff options
author | Derek Mauro <dmauro@google.com> | 2022-04-22 18:25:26 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-04-22 18:26:03 (GMT) |
commit | bf66935e07825318ae519675d73d0f3e313b3ec6 (patch) | |
tree | d23875e66696f765c265fc1a1df5a594490507e0 /googlemock | |
parent | b85864c64758dec007208e56af933fc3f52044ee (diff) | |
download | googletest-bf66935e07825318ae519675d73d0f3e313b3ec6.zip googletest-bf66935e07825318ae519675d73d0f3e313b3ec6.tar.gz googletest-bf66935e07825318ae519675d73d0f3e313b3ec6.tar.bz2 |
Remove the legacy internal GTEST_DISALLOW_* macros
PiperOrigin-RevId: 443715444
Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 12 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 7 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-nice-strict.h | 9 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-spec-builders.h | 12 | ||||
-rw-r--r-- | googlemock/src/gmock-cardinalities.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock-actions_test.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock-cardinalities_test.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock-function-mocker_test.cc | 38 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers-arithmetic_test.cc | 6 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers-comparisons_test.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers-containers_test.cc | 8 | ||||
-rw-r--r-- | googlemock/test/gmock-matchers-misc_test.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock-nice-strict_test.cc | 9 | ||||
-rw-r--r-- | googlemock/test/gmock-spec-builders_test.cc | 22 | ||||
-rw-r--r-- | googlemock/test/gmock_leak_test_.cc | 3 | ||||
-rw-r--r-- | googlemock/test/gmock_link_test.h | 3 | ||||
-rw-r--r-- | googlemock/test/gmock_output_test_.cc | 3 |
17 files changed, 101 insertions, 46 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index e84670a..a2b25d9 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -393,7 +393,8 @@ class DefaultValue { private: const T value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer); + FixedValueProducer(const FixedValueProducer&) = delete; + FixedValueProducer& operator=(const FixedValueProducer&) = delete; }; class FactoryValueProducer : public ValueProducer { @@ -404,7 +405,8 @@ class DefaultValue { private: const FactoryFunction factory_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer); + FactoryValueProducer(const FactoryValueProducer&) = delete; + FactoryValueProducer& operator=(const FactoryValueProducer&) = delete; }; static ValueProducer* producer_; @@ -478,7 +480,8 @@ class ActionInterface { virtual Result Perform(const ArgumentTuple& args) = 0; private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface); + ActionInterface(const ActionInterface&) = delete; + ActionInterface& operator=(const ActionInterface&) = delete; }; // An Action<F> is a copyable and IMMUTABLE (except by assignment) @@ -951,7 +954,8 @@ class ReturnAction { R value_before_cast_; Result value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl); + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; }; // Partially specialize for ByMoveWrapper. This version of ReturnAction will diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index fb46715..c349c20 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -313,7 +313,9 @@ class StringMatchResultListener : public MatchResultListener { private: ::std::stringstream ss_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener); + StringMatchResultListener(const StringMatchResultListener&) = delete; + StringMatchResultListener& operator=(const StringMatchResultListener&) = + delete; }; // Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION @@ -2555,7 +2557,8 @@ class WhenSortedByMatcher { const Comparator comparator_; const Matcher<const ::std::vector<LhsValue>&> matcher_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl); + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; }; private: diff --git a/googlemock/include/gmock/gmock-nice-strict.h b/googlemock/include/gmock/gmock-nice-strict.h index f421dea..28b3945 100644 --- a/googlemock/include/gmock/gmock-nice-strict.h +++ b/googlemock/include/gmock/gmock-nice-strict.h @@ -169,7 +169,8 @@ class GTEST_INTERNAL_EMPTY_BASE_CLASS NiceMock } private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock); + NiceMock(const NiceMock&) = delete; + NiceMock& operator=(const NiceMock&) = delete; }; template <class MockClass> @@ -210,7 +211,8 @@ class GTEST_INTERNAL_EMPTY_BASE_CLASS NaggyMock } private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(NaggyMock); + NaggyMock(const NaggyMock&) = delete; + NaggyMock& operator=(const NaggyMock&) = delete; }; template <class MockClass> @@ -251,7 +253,8 @@ class GTEST_INTERNAL_EMPTY_BASE_CLASS StrictMock } private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock); + StrictMock(const StrictMock&) = delete; + StrictMock& operator=(const StrictMock&) = delete; }; #undef GTEST_INTERNAL_EMPTY_BASE_CLASS diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 917fa9a..a3e32a4 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -677,7 +677,8 @@ class GTEST_API_ InSequence { private: bool sequence_created_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence); // NOLINT + InSequence(const InSequence&) = delete; + InSequence& operator=(const InSequence&) = delete; } GTEST_ATTRIBUTE_UNUSED_; namespace internal { @@ -1219,7 +1220,8 @@ class TypedExpectation : public ExpectationBase { Matcher<const ArgumentTuple&> extra_matcher_; Action<F> repeated_action_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(TypedExpectation); + TypedExpectation(const TypedExpectation&) = delete; + TypedExpectation& operator=(const TypedExpectation&) = delete; }; // class TypedExpectation // A MockSpec object is used by ON_CALL() or EXPECT_CALL() for @@ -1392,7 +1394,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase { Wrapper result_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder); + ActionResultHolder(const ActionResultHolder&) = delete; + ActionResultHolder& operator=(const ActionResultHolder&) = delete; }; // Specialization for T = void. @@ -1425,7 +1428,8 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase { private: ActionResultHolder() {} - GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder); + ActionResultHolder(const ActionResultHolder&) = delete; + ActionResultHolder& operator=(const ActionResultHolder&) = delete; }; template <typename F> diff --git a/googlemock/src/gmock-cardinalities.cc b/googlemock/src/gmock-cardinalities.cc index 1e7b898..92cde34 100644 --- a/googlemock/src/gmock-cardinalities.cc +++ b/googlemock/src/gmock-cardinalities.cc @@ -86,7 +86,8 @@ class BetweenCardinalityImpl : public CardinalityInterface { const int min_; const int max_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(BetweenCardinalityImpl); + BetweenCardinalityImpl(const BetweenCardinalityImpl&) = delete; + BetweenCardinalityImpl& operator=(const BetweenCardinalityImpl&) = delete; }; // Formats "n times" in a human-friendly way. diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index 198510b..cce3f4b 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -869,7 +869,8 @@ class MockClass { int(const std::unique_ptr<int>&, std::unique_ptr<int>)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockClass); + MockClass(const MockClass&) = delete; + MockClass& operator=(const MockClass&) = delete; }; // Tests that DoDefault() returns the built-in default value for the diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc index e7efd97..cdd9956 100644 --- a/googlemock/test/gmock-cardinalities_test.cc +++ b/googlemock/test/gmock-cardinalities_test.cc @@ -54,7 +54,8 @@ class MockFoo { MOCK_METHOD0(Bar, int()); // NOLINT private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); + MockFoo(const MockFoo&) = delete; + MockFoo& operator=(const MockFoo&) = delete; }; // Tests that Cardinality objects can be default constructed. diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc index dc750a3..d336a1e 100644 --- a/googlemock/test/gmock-function-mocker_test.cc +++ b/googlemock/test/gmock-function-mocker_test.cc @@ -202,7 +202,8 @@ class MockFoo : public FooInterface { MOCK_METHOD(int, RefQualifiedOverloaded, (), (ref(&&), override)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); + MockFoo(const MockFoo&) = delete; + MockFoo& operator=(const MockFoo&) = delete; }; class LegacyMockFoo : public FooInterface { @@ -274,7 +275,8 @@ class LegacyMockFoo : public FooInterface { int RefQualifiedOverloaded() && override { return 0; } private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockFoo); + LegacyMockFoo(const LegacyMockFoo&) = delete; + LegacyMockFoo& operator=(const LegacyMockFoo&) = delete; }; #ifdef _MSC_VER @@ -492,7 +494,8 @@ class MockB { MOCK_METHOD(void, DoB, ()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB); + MockB(const MockB&) = delete; + MockB& operator=(const MockB&) = delete; }; class LegacyMockB { @@ -502,7 +505,8 @@ class LegacyMockB { MOCK_METHOD0(DoB, void()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockB); + LegacyMockB(const LegacyMockB&) = delete; + LegacyMockB& operator=(const LegacyMockB&) = delete; }; template <typename T> @@ -557,7 +561,8 @@ class MockStack : public StackInterface<T> { MOCK_METHOD((std::map<int, int>), ReturnTypeWithComma, (int), (const)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStack); + MockStack(const MockStack&) = delete; + MockStack& operator=(const MockStack&) = delete; }; template <typename T> @@ -575,7 +580,8 @@ class LegacyMockStack : public StackInterface<T> { MOCK_CONST_METHOD1_T(ReturnTypeWithComma, std::map<int, int>(int)); // NOLINT private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockStack); + LegacyMockStack(const LegacyMockStack&) = delete; + LegacyMockStack& operator=(const LegacyMockStack&) = delete; }; template <typename T> @@ -645,7 +651,8 @@ class MockStackWithCallType : public StackInterfaceWithCallType<T> { (Calltype(STDMETHODCALLTYPE), override, const)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStackWithCallType); + MockStackWithCallType(const MockStackWithCallType&) = delete; + MockStackWithCallType& operator=(const MockStackWithCallType&) = delete; }; template <typename T> @@ -659,7 +666,9 @@ class LegacyMockStackWithCallType : public StackInterfaceWithCallType<T> { MOCK_CONST_METHOD0_T_WITH_CALLTYPE(STDMETHODCALLTYPE, GetTop, const T&()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockStackWithCallType); + LegacyMockStackWithCallType(const LegacyMockStackWithCallType&) = delete; + LegacyMockStackWithCallType& operator=(const LegacyMockStackWithCallType&) = + delete; }; template <typename T> @@ -709,7 +718,9 @@ class MockOverloadedOnArgNumber { MY_MOCK_METHODS1_; private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnArgNumber); + MockOverloadedOnArgNumber(const MockOverloadedOnArgNumber&) = delete; + MockOverloadedOnArgNumber& operator=(const MockOverloadedOnArgNumber&) = + delete; }; class LegacyMockOverloadedOnArgNumber { @@ -719,7 +730,10 @@ class LegacyMockOverloadedOnArgNumber { LEGACY_MY_MOCK_METHODS1_; private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockOverloadedOnArgNumber); + LegacyMockOverloadedOnArgNumber(const LegacyMockOverloadedOnArgNumber&) = + delete; + LegacyMockOverloadedOnArgNumber& operator=( + const LegacyMockOverloadedOnArgNumber&) = delete; }; template <typename T> @@ -751,7 +765,9 @@ class MockOverloadedOnConstness { MY_MOCK_METHODS2_; private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnConstness); + MockOverloadedOnConstness(const MockOverloadedOnConstness&) = delete; + MockOverloadedOnConstness& operator=(const MockOverloadedOnConstness&) = + delete; }; TEST(MockMethodOverloadedMockMethodTest, CanOverloadOnConstnessInMacroBody) { diff --git a/googlemock/test/gmock-matchers-arithmetic_test.cc b/googlemock/test/gmock-matchers-arithmetic_test.cc index 9c36dd2..ef53baa 100644 --- a/googlemock/test/gmock-matchers-arithmetic_test.cc +++ b/googlemock/test/gmock-matchers-arithmetic_test.cc @@ -955,7 +955,8 @@ class AllArgsHelper { MOCK_METHOD2(Helper, int(char x, int y)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(AllArgsHelper); + AllArgsHelper(const AllArgsHelper&) = delete; + AllArgsHelper& operator=(const AllArgsHelper&) = delete; }; TEST(AllArgsTest, WorksInWithClause) { @@ -982,7 +983,8 @@ class OptionalMatchersHelper { MOCK_METHOD2(Overloaded, int(char x, int y)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(OptionalMatchersHelper); + OptionalMatchersHelper(const OptionalMatchersHelper&) = delete; + OptionalMatchersHelper& operator=(const OptionalMatchersHelper&) = delete; }; TEST(AllArgsTest, WorksWithoutMatchers) { diff --git a/googlemock/test/gmock-matchers-comparisons_test.cc b/googlemock/test/gmock-matchers-comparisons_test.cc index 82c7ce6..63af04e 100644 --- a/googlemock/test/gmock-matchers-comparisons_test.cc +++ b/googlemock/test/gmock-matchers-comparisons_test.cc @@ -579,7 +579,8 @@ class Base { Base() {} private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(Base); + Base(const Base&) = delete; + Base& operator=(const Base&) = delete; }; class Derived : public Base { diff --git a/googlemock/test/gmock-matchers-containers_test.cc b/googlemock/test/gmock-matchers-containers_test.cc index 74a226d..be74dd7 100644 --- a/googlemock/test/gmock-matchers-containers_test.cc +++ b/googlemock/test/gmock-matchers-containers_test.cc @@ -342,7 +342,8 @@ class Uncopyable { private: int value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(Uncopyable); + Uncopyable(const Uncopyable&) = delete; + Uncopyable& operator=(const Uncopyable&) = delete; }; // Returns true if and only if x.value() is positive. @@ -2764,7 +2765,10 @@ class NativeArrayPassedAsPointerAndSize { MOCK_METHOD(void, Helper, (int* array, int size)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(NativeArrayPassedAsPointerAndSize); + NativeArrayPassedAsPointerAndSize(const NativeArrayPassedAsPointerAndSize&) = + delete; + NativeArrayPassedAsPointerAndSize& operator=( + const NativeArrayPassedAsPointerAndSize&) = delete; }; TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) { diff --git a/googlemock/test/gmock-matchers-misc_test.cc b/googlemock/test/gmock-matchers-misc_test.cc index 8a4aef3..efb0059 100644 --- a/googlemock/test/gmock-matchers-misc_test.cc +++ b/googlemock/test/gmock-matchers-misc_test.cc @@ -106,7 +106,8 @@ class NotCopyable { private: int value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(NotCopyable); + NotCopyable(const NotCopyable&) = delete; + NotCopyable& operator=(const NotCopyable&) = delete; }; TEST(ByRefTest, AllowsNotCopyableConstValueInMatchers) { diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 21130d4..08254e1 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -45,7 +45,8 @@ class Mock { MOCK_METHOD0(DoThis, void()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock); + Mock(const Mock&) = delete; + Mock& operator=(const Mock&) = delete; }; namespace testing { @@ -93,7 +94,8 @@ class MockFoo : public Foo { MOCK_METHOD0(ReturnNonDefaultConstructible, NotDefaultConstructible()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); + MockFoo(const MockFoo&) = delete; + MockFoo& operator=(const MockFoo&) = delete; }; class MockBar { @@ -117,7 +119,8 @@ class MockBar { private: std::string str_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar); + MockBar(const MockBar&) = delete; + MockBar& operator=(const MockBar&) = delete; }; class MockBaz { diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index b59676f..d32fb42 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -150,7 +150,8 @@ class MockA { MOCK_METHOD2(ReturnInt, int(int x, int y)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockA); + MockA(const MockA&) = delete; + MockA& operator=(const MockA&) = delete; }; class MockB { @@ -161,7 +162,8 @@ class MockB { MOCK_METHOD1(DoB, int(int n)); // NOLINT private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB); + MockB(const MockB&) = delete; + MockB& operator=(const MockB&) = delete; }; class ReferenceHoldingMock { @@ -171,7 +173,8 @@ class ReferenceHoldingMock { MOCK_METHOD1(AcceptReference, void(std::shared_ptr<MockA>*)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ReferenceHoldingMock); + ReferenceHoldingMock(const ReferenceHoldingMock&) = delete; + ReferenceHoldingMock& operator=(const ReferenceHoldingMock&) = delete; }; // Tests that EXPECT_CALL and ON_CALL compile in a presence of macro @@ -193,7 +196,8 @@ class MockCC : public CC { MOCK_METHOD0(Method, int()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockCC); + MockCC(const MockCC&) = delete; + MockCC& operator=(const MockCC&) = delete; }; // Tests that a method with expanded name compiles. @@ -1894,7 +1898,8 @@ class MockC { MOCK_METHOD0(NonVoidMethod, int()); // NOLINT private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockC); + MockC(const MockC&) = delete; + MockC& operator=(const MockC&) = delete; }; class VerboseFlagPreservingFixture : public testing::Test { @@ -1909,7 +1914,9 @@ class VerboseFlagPreservingFixture : public testing::Test { private: const std::string saved_verbose_flag_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(VerboseFlagPreservingFixture); + VerboseFlagPreservingFixture(const VerboseFlagPreservingFixture&) = delete; + VerboseFlagPreservingFixture& operator=(const VerboseFlagPreservingFixture&) = + delete; }; #if GTEST_HAS_STREAM_REDIRECTION @@ -2129,7 +2136,8 @@ class LogTestHelper { MOCK_METHOD1(Foo, PrintMeNot(PrintMeNot)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(LogTestHelper); + LogTestHelper(const LogTestHelper&) = delete; + LogTestHelper& operator=(const LogTestHelper&) = delete; }; class GMockLogTest : public VerboseFlagPreservingFixture { diff --git a/googlemock/test/gmock_leak_test_.cc b/googlemock/test/gmock_leak_test_.cc index ad6f6d6..fa64591 100644 --- a/googlemock/test/gmock_leak_test_.cc +++ b/googlemock/test/gmock_leak_test_.cc @@ -51,7 +51,8 @@ class MockFoo : public FooInterface { MOCK_METHOD0(DoThis, void()); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); + MockFoo(const MockFoo&) = delete; + MockFoo& operator=(const MockFoo&) = delete; }; TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEnabled) { diff --git a/googlemock/test/gmock_link_test.h b/googlemock/test/gmock_link_test.h index dc9bd85..eaf18e9 100644 --- a/googlemock/test/gmock_link_test.h +++ b/googlemock/test/gmock_link_test.h @@ -221,7 +221,8 @@ class Mock : public Interface { MOCK_METHOD1(VoidFromVector, void(const std::vector<int>& v)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock); + Mock(const Mock&) = delete; + Mock& operator=(const Mock&) = delete; }; class InvokeHelper { diff --git a/googlemock/test/gmock_output_test_.cc b/googlemock/test/gmock_output_test_.cc index b4abbc9..a178691 100644 --- a/googlemock/test/gmock_output_test_.cc +++ b/googlemock/test/gmock_output_test_.cc @@ -62,7 +62,8 @@ class MockFoo { MOCK_METHOD2(Bar3, void(int x, int y)); private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); + MockFoo(const MockFoo&) = delete; + MockFoo& operator=(const MockFoo&) = delete; }; class GMockOutputTest : public testing::Test { |