tesseract v5.3.3.20231005
testing::TestInfo Class Reference

#include <gtest.h>

Public Member Functions

 ~TestInfo ()
 
const char * test_suite_name () const
 
const char * test_case_name () const
 
const char * name () const
 
const char * type_param () const
 
const char * value_param () const
 
const char * file () const
 
int line () const
 
bool is_in_another_shard () const
 
bool should_run () const
 
bool is_reportable () const
 
const TestResultresult () const
 

Friends

class Test
 
class TestSuite
 
class internal::UnitTestImpl
 
class internal::StreamingListenerTest
 
TestInfointernal::MakeAndRegisterTestInfo (const char *test_suite_name, const char *name, const char *type_param, const char *value_param, internal::CodeLocation code_location, internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc, internal::TestFactoryBase *factory)
 

Detailed Description

Definition at line 704 of file gtest.h.

Constructor & Destructor Documentation

◆ ~TestInfo()

testing::TestInfo::~TestInfo ( )

Definition at line 2734 of file gtest.cc.

2734{ delete factory_; }

Member Function Documentation

◆ file()

const char * testing::TestInfo::file ( ) const
inline

Definition at line 736 of file gtest.h.

736{ return location_.file.c_str(); }

◆ is_in_another_shard()

bool testing::TestInfo::is_in_another_shard ( ) const
inline

Definition at line 742 of file gtest.h.

742{ return is_in_another_shard_; }

◆ is_reportable()

bool testing::TestInfo::is_reportable ( ) const
inline

Definition at line 763 of file gtest.h.

763 {
764 // The XML report includes tests matching the filter, excluding those
765 // run in other shards.
766 return matches_filter_ && !is_in_another_shard_;
767 }

◆ line()

int testing::TestInfo::line ( ) const
inline

Definition at line 739 of file gtest.h.

739{ return location_.line; }

◆ name()

const char * testing::TestInfo::name ( ) const
inline

Definition at line 719 of file gtest.h.

719{ return name_.c_str(); }

◆ result()

const TestResult * testing::TestInfo::result ( ) const
inline

Definition at line 770 of file gtest.h.

770{ return &result_; }

◆ should_run()

bool testing::TestInfo::should_run ( ) const
inline

Definition at line 760 of file gtest.h.

760{ return should_run_; }

◆ test_case_name()

const char * testing::TestInfo::test_case_name ( ) const
inline

Definition at line 715 of file gtest.h.

715{ return test_suite_name(); }
const char * test_suite_name() const
Definition: gtest.h:711

◆ test_suite_name()

const char * testing::TestInfo::test_suite_name ( ) const
inline

Definition at line 711 of file gtest.h.

711{ return test_suite_name_.c_str(); }

◆ type_param()

const char * testing::TestInfo::type_param ( ) const
inline

Definition at line 723 of file gtest.h.

723 {
724 if (type_param_.get() != nullptr) return type_param_->c_str();
725 return nullptr;
726 }

◆ value_param()

const char * testing::TestInfo::value_param ( ) const
inline

Definition at line 730 of file gtest.h.

730 {
731 if (value_param_.get() != nullptr) return value_param_->c_str();
732 return nullptr;
733 }

Friends And Related Function Documentation

◆ internal::MakeAndRegisterTestInfo

TestInfo * internal::MakeAndRegisterTestInfo ( const char *  test_suite_name,
const char *  name,
const char *  type_param,
const char *  value_param,
internal::CodeLocation  code_location,
internal::TypeId  fixture_class_id,
internal::SetUpTestSuiteFunc  set_up_tc,
internal::TearDownTestSuiteFunc  tear_down_tc,
internal::TestFactoryBase factory 
)
friend

◆ internal::StreamingListenerTest

friend class internal::StreamingListenerTest
friend

Definition at line 779 of file gtest.h.

◆ internal::UnitTestImpl

friend class internal::UnitTestImpl
friend

Definition at line 778 of file gtest.h.

◆ Test

friend class Test
friend

Definition at line 776 of file gtest.h.

◆ TestSuite

friend class TestSuite
friend

Definition at line 777 of file gtest.h.


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