tesseract v5.3.3.20231005
Predicate4Test Class Reference
Inheritance diagram for Predicate4Test:
testing::Test

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
virtual void SetUp ()
 
virtual void TearDown ()
 

Static Protected Attributes

static bool expected_to_finish_
 
static bool finished_
 
static int n1_
 
static int n2_
 
static int n3_
 
static int n4_
 

Additional Inherited Members

- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestSuite ()
 
static void TearDownTestSuite ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool IsSkipped ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 

Detailed Description

Definition at line 1421 of file gtest_pred_impl_unittest.cc.

Member Function Documentation

◆ SetUp()

void Predicate4Test::SetUp ( )
inlineoverrideprotectedvirtual

Reimplemented from testing::Test.

Definition at line 1423 of file gtest_pred_impl_unittest.cc.

1423 {
1424 expected_to_finish_ = true;
1425 finished_ = false;
1426 n1_ = n2_ = n3_ = n4_ = 0;
1427 }

◆ TearDown()

void Predicate4Test::TearDown ( )
inlineoverrideprotectedvirtual

Reimplemented from testing::Test.

Definition at line 1429 of file gtest_pred_impl_unittest.cc.

1429 {
1430 // Verifies that each of the predicate's arguments was evaluated
1431 // exactly once.
1432 EXPECT_EQ(1, n1_) <<
1433 "The predicate assertion didn't evaluate argument 2 "
1434 "exactly once.";
1435 EXPECT_EQ(1, n2_) <<
1436 "The predicate assertion didn't evaluate argument 3 "
1437 "exactly once.";
1438 EXPECT_EQ(1, n3_) <<
1439 "The predicate assertion didn't evaluate argument 4 "
1440 "exactly once.";
1441 EXPECT_EQ(1, n4_) <<
1442 "The predicate assertion didn't evaluate argument 5 "
1443 "exactly once.";
1444
1445 // Verifies that the control flow in the test function is expected.
1447 FAIL() << "The predicate assertion unexpactedly aborted the test.";
1448 } else if (!expected_to_finish_ && finished_) {
1449 FAIL() << "The failed predicate assertion didn't abort the test "
1450 "as expected.";
1451 }
1452 }
#define FAIL()
Definition: gtest.h:1928
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:2043

Member Data Documentation

◆ expected_to_finish_

bool Predicate4Test::expected_to_finish_
staticprotected

Definition at line 1455 of file gtest_pred_impl_unittest.cc.

◆ finished_

bool Predicate4Test::finished_
staticprotected

Definition at line 1458 of file gtest_pred_impl_unittest.cc.

◆ n1_

int Predicate4Test::n1_
staticprotected

Definition at line 1460 of file gtest_pred_impl_unittest.cc.

◆ n2_

int Predicate4Test::n2_
staticprotected

Definition at line 1461 of file gtest_pred_impl_unittest.cc.

◆ n3_

int Predicate4Test::n3_
staticprotected

Definition at line 1462 of file gtest_pred_impl_unittest.cc.

◆ n4_

int Predicate4Test::n4_
staticprotected

Definition at line 1463 of file gtest_pred_impl_unittest.cc.


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