Googletest export

Applied fixes for ClangTidy modernize-use-override and modernize-use-using.

PiperOrigin-RevId: 223800219
This commit is contained in:
Abseil Team
2018-12-03 11:30:02 -05:00
committed by Gennadiy Civil
parent a42cdf2abd
commit 26743363be
51 changed files with 507 additions and 555 deletions

View File

@@ -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();