summaryrefslogtreecommitdiffstats
path: root/googlemock/include
diff options
context:
space:
mode:
authorDerek Mauro <dmauro@google.com>2022-04-22 18:25:26 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-04-22 18:26:03 (GMT)
commitbf66935e07825318ae519675d73d0f3e313b3ec6 (patch)
treed23875e66696f765c265fc1a1df5a594490507e0 /googlemock/include
parentb85864c64758dec007208e56af933fc3f52044ee (diff)
downloadgoogletest-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/include')
-rw-r--r--googlemock/include/gmock/gmock-actions.h12
-rw-r--r--googlemock/include/gmock/gmock-matchers.h7
-rw-r--r--googlemock/include/gmock/gmock-nice-strict.h9
-rw-r--r--googlemock/include/gmock/gmock-spec-builders.h12
4 files changed, 27 insertions, 13 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>