Googletest export

Remove unneeded check for NULL.
Note: this started as OSS PR https://github.com/google/googletest/pull/967 but changed
PiperOrigin-RevId: 209819732
pull/1779/head
misterg 7 years ago committed by Gennadiy Civil
parent 9dae300121
commit 87494afca7
  1. 14
      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);

Loading…
Cancel
Save