tesseract v5.3.3.20231005
TestGenerationEnvironment< kExpectedCalls > Class Template Reference
Inheritance diagram for TestGenerationEnvironment< kExpectedCalls >:
testing::Environment

Public Member Functions

void FixtureConstructorExecuted ()
 
void SetUpExecuted ()
 
void TearDownExecuted ()
 
void TestBodyExecuted ()
 
void TearDown () override
 
- Public Member Functions inherited from testing::Environment
virtual ~Environment ()
 
virtual void SetUp ()
 
virtual void TearDown ()
 

Static Public Member Functions

static TestGenerationEnvironmentInstance ()
 

Detailed Description

template<int kExpectedCalls>
class TestGenerationEnvironment< kExpectedCalls >

Definition at line 555 of file googletest-param-test-test.cc.

Member Function Documentation

◆ FixtureConstructorExecuted()

template<int kExpectedCalls>
void TestGenerationEnvironment< kExpectedCalls >::FixtureConstructorExecuted ( )
inline

Definition at line 562 of file googletest-param-test-test.cc.

562{ fixture_constructor_count_++; }

◆ Instance()

template<int kExpectedCalls>
static TestGenerationEnvironment * TestGenerationEnvironment< kExpectedCalls >::Instance ( )
inlinestatic

Definition at line 557 of file googletest-param-test-test.cc.

557 {
559 return instance;
560 }

◆ SetUpExecuted()

template<int kExpectedCalls>
void TestGenerationEnvironment< kExpectedCalls >::SetUpExecuted ( )
inline

Definition at line 563 of file googletest-param-test-test.cc.

563{ set_up_count_++; }

◆ TearDown()

template<int kExpectedCalls>
void TestGenerationEnvironment< kExpectedCalls >::TearDown ( )
inlineoverridevirtual

Reimplemented from testing::Environment.

Definition at line 567 of file googletest-param-test-test.cc.

567 {
568 // If all MultipleTestGenerationTest tests have been de-selected
569 // by the filter flag, the following checks make no sense.
570 bool perform_check = false;
571
572 for (int i = 0; i < kExpectedCalls; ++i) {
573 Message msg;
574 msg << "TestsExpandedAndRun/" << i;
575 if (UnitTestOptions::FilterMatchesTest(
576 "TestExpansionModule/MultipleTestGenerationTest",
577 msg.GetString().c_str())) {
578 perform_check = true;
579 }
580 }
581 if (perform_check) {
582 EXPECT_EQ(kExpectedCalls, fixture_constructor_count_)
583 << "Fixture constructor of ParamTestGenerationTest test case "
584 << "has not been run as expected.";
585 EXPECT_EQ(kExpectedCalls, set_up_count_)
586 << "Fixture SetUp method of ParamTestGenerationTest test case "
587 << "has not been run as expected.";
588 EXPECT_EQ(kExpectedCalls, tear_down_count_)
589 << "Fixture TearDown method of ParamTestGenerationTest test case "
590 << "has not been run as expected.";
591 EXPECT_EQ(kExpectedCalls, test_body_count_)
592 << "Test in ParamTestGenerationTest test case "
593 << "has not been run as expected.";
594 }
595 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:2043

◆ TearDownExecuted()

template<int kExpectedCalls>
void TestGenerationEnvironment< kExpectedCalls >::TearDownExecuted ( )
inline

Definition at line 564 of file googletest-param-test-test.cc.

564{ tear_down_count_++; }

◆ TestBodyExecuted()

template<int kExpectedCalls>
void TestGenerationEnvironment< kExpectedCalls >::TestBodyExecuted ( )
inline

Definition at line 565 of file googletest-param-test-test.cc.

565{ test_body_count_++; }

The documentation for this class was generated from the following file: