diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-08-24 15:30:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 15:30:02 (GMT) |
commit | 205df1058ef549f70f600b368604745fee863de9 (patch) | |
tree | eb0e310467d647ad68c626929c80476527df893c /googletest | |
parent | 6de39826aa190a07179a8104c00ad11ea20d8679 (diff) | |
parent | 7f11b9ffb5712e2889a74856caf7507bb5c90da1 (diff) | |
download | googletest-205df1058ef549f70f600b368604745fee863de9.zip googletest-205df1058ef549f70f600b368604745fee863de9.tar.gz googletest-205df1058ef549f70f600b368604745fee863de9.tar.bz2 |
Merge branch 'master' into issue_1735refs/pull/1767/head
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/src/gtest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 888ffd1..e9127a1 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -2679,18 +2679,18 @@ void TestInfo::Run() { factory_, &internal::TestFactoryBase::CreateTest, "the test fixture's constructor"); - // Runs the test only if the test object was created and its - // constructor didn't generate a fatal failure. - if ((test != NULL) && !Test::HasFatalFailure()) { + // Runs the test if the constructor didn't generate a fatal failure. + // Note that the object will not be null + if (!Test::HasFatalFailure()) { // This doesn't throw as all user code that can throw are wrapped into // exception handling code. test->Run(); } - // Deletes the test object. - impl->os_stack_trace_getter()->UponLeavingGTest(); - internal::HandleExceptionsInMethodIfSupported( - test, &Test::DeleteSelf_, "the test fixture's destructor"); + // Deletes the test object. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + test, &Test::DeleteSelf_, "the test fixture's destructor"); result_.set_elapsed_time(internal::GetTimeInMillis() - start); |