diff options
author | Abseil Team <absl-team@google.com> | 2018-12-03 16:30:02 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-12-03 17:54:11 (GMT) |
commit | 26743363be8f579ee7d637e5b15cbf73e9e18a4a (patch) | |
tree | fb89238693dad174c6ddaf57f04bae3c8f41d7fb /googletest/src/gtest-death-test.cc | |
parent | a42cdf2abdc0ab7ddfbafc098cafdd6152ae1b70 (diff) | |
download | googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.zip googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.tar.gz googletest-26743363be8f579ee7d637e5b15cbf73e9e18a4a.tar.bz2 |
Googletest export
Applied fixes for ClangTidy modernize-use-override and modernize-use-using.
PiperOrigin-RevId: 223800219
Diffstat (limited to 'googletest/src/gtest-death-test.cc')
-rw-r--r-- | googletest/src/gtest-death-test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index ff04e54..fb885e2 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -407,10 +407,10 @@ class DeathTestImpl : public DeathTest { write_fd_(-1) {} // read_fd_ is expected to be closed and cleared by a derived class. - ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } + ~DeathTestImpl() override { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } - void Abort(AbortReason reason); - virtual bool Passed(bool status_ok); + void Abort(AbortReason reason) override; + bool Passed(bool status_ok) override; const char* statement() const { return statement_; } bool spawned() const { return spawned_; } @@ -1065,7 +1065,7 @@ class ForkingDeathTest : public DeathTestImpl { ForkingDeathTest(const char* statement, Matcher<const std::string&> matcher); // All of these virtual functions are inherited from DeathTest. - virtual int Wait(); + int Wait() override; protected: void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } @@ -1101,7 +1101,7 @@ class NoExecDeathTest : public ForkingDeathTest { public: NoExecDeathTest(const char* a_statement, Matcher<const std::string&> matcher) : ForkingDeathTest(a_statement, std::move(matcher)) {} - virtual TestRole AssumeRole(); + TestRole AssumeRole() override; }; // The AssumeRole process for a fork-and-run death test. It implements a @@ -1159,7 +1159,8 @@ class ExecDeathTest : public ForkingDeathTest { : ForkingDeathTest(a_statement, std::move(matcher)), file_(file), line_(line) {} - virtual TestRole AssumeRole(); + TestRole AssumeRole() override; + private: static ::std::vector<std::string> GetArgvsForDeathTestChildProcess() { ::std::vector<std::string> args = GetInjectableArgvs(); |