mirror of
https://github.com/google/googletest.git
synced 2024-12-28 11:10:44 +08:00
Merge pull request #2475 from peterbarker:pr/google-add-override
PiperOrigin-RevId: 273379796
This commit is contained in:
commit
cd17fa2abd
@ -474,13 +474,13 @@ class PolymorphicMatcher {
|
|||||||
public:
|
public:
|
||||||
explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
|
explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
|
||||||
|
|
||||||
virtual void DescribeTo(::std::ostream* os) const { impl_.DescribeTo(os); }
|
void DescribeTo(::std::ostream* os) const override { impl_.DescribeTo(os); }
|
||||||
|
|
||||||
virtual void DescribeNegationTo(::std::ostream* os) const {
|
void DescribeNegationTo(::std::ostream* os) const override {
|
||||||
impl_.DescribeNegationTo(os);
|
impl_.DescribeNegationTo(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool MatchAndExplain(T x, MatchResultListener* listener) const {
|
bool MatchAndExplain(T x, MatchResultListener* listener) const override {
|
||||||
return impl_.MatchAndExplain(x, listener);
|
return impl_.MatchAndExplain(x, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {
|
|||||||
: public test_suite_name { \
|
: public test_suite_name { \
|
||||||
public: \
|
public: \
|
||||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \
|
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \
|
||||||
virtual void TestBody(); \
|
void TestBody() override; \
|
||||||
\
|
\
|
||||||
private: \
|
private: \
|
||||||
static int AddToRegistry() { \
|
static int AddToRegistry() { \
|
||||||
|
@ -1358,7 +1358,7 @@ constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; }
|
|||||||
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \
|
GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \
|
||||||
\
|
\
|
||||||
private: \
|
private: \
|
||||||
virtual void TestBody(); \
|
void TestBody() override; \
|
||||||
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \
|
||||||
test_name)); \
|
test_name)); \
|
||||||
|
@ -1808,7 +1808,7 @@ class GTEST_API_ ThreadLocal {
|
|||||||
class DefaultValueHolderFactory : public ValueHolderFactory {
|
class DefaultValueHolderFactory : public ValueHolderFactory {
|
||||||
public:
|
public:
|
||||||
DefaultValueHolderFactory() {}
|
DefaultValueHolderFactory() {}
|
||||||
virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); }
|
ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);
|
||||||
@ -1817,7 +1817,7 @@ class GTEST_API_ ThreadLocal {
|
|||||||
class InstanceValueHolderFactory : public ValueHolderFactory {
|
class InstanceValueHolderFactory : public ValueHolderFactory {
|
||||||
public:
|
public:
|
||||||
explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
|
explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
|
||||||
virtual ValueHolder* MakeNewHolder() const {
|
ValueHolder* MakeNewHolder() const override {
|
||||||
return new ValueHolder(value_);
|
return new ValueHolder(value_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user