MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / Run

Method Run

tests/gtest/gtest-all.cc:3992–4012  ·  view source on GitHub ↗

Runs the test and updates the test result.

Source from the content-addressed store, hash-verified

3990
3991// Runs the test and updates the test result.
3992void Test::Run() {
3993 if (!HasSameFixtureClass()) return;
3994
3995 internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
3996 impl->os_stack_trace_getter()->UponLeavingGTest();
3997 internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
3998 // We will run the test only if SetUp() was successful and didn't call
3999 // GTEST_SKIP().
4000 if (!HasFatalFailure() && !IsSkipped()) {
4001 impl->os_stack_trace_getter()->UponLeavingGTest();
4002 internal::HandleExceptionsInMethodIfSupported(
4003 this, &Test::TestBody, "the test body");
4004 }
4005
4006 // However, we want to clean up as much as possible. Hence we will
4007 // always call TearDown(), even if SetUp() or the test body has
4008 // failed.
4009 impl->os_stack_trace_getter()->UponLeavingGTest();
4010 internal::HandleExceptionsInMethodIfSupported(
4011 this, &Test::TearDown, "TearDown()");
4012}
4013
4014// Returns true iff the current test has a fatal failure.
4015bool Test::HasFatalFailure() {

Callers 2

RunAllTestsMethod · 0.45
ThreadMainMethod · 0.45

Calls 13

GetUnitTestImplFunction · 0.85
GetTimeInMillisFunction · 0.85
GetEnvFunction · 0.85
implFunction · 0.85
os_stack_trace_getterMethod · 0.80
repeaterMethod · 0.80
OnTestStartMethod · 0.45
OnTestEndMethod · 0.45
OnTestSuiteStartMethod · 0.45
OnTestCaseStartMethod · 0.45
OnTestSuiteEndMethod · 0.45

Tested by

no test coverage detected