CHROMA
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
testing::internal::UnitTestImpl Class Reference

Public Types

enum  ReactionToSharding { HONOR_SHARDING_PROTOCOL , IGNORE_SHARDING_PROTOCOL }
 

Public Member Functions

 UnitTestImpl (UnitTest *parent)
 
virtual ~UnitTestImpl ()
 
TestPartResultReporterInterfaceGetGlobalTestPartResultReporter ()
 
void SetGlobalTestPartResultReporter (TestPartResultReporterInterface *reporter)
 
TestPartResultReporterInterfaceGetTestPartResultReporterForCurrentThread ()
 
void SetTestPartResultReporterForCurrentThread (TestPartResultReporterInterface *reporter)
 
int successful_test_case_count () const
 
int failed_test_case_count () const
 
int total_test_case_count () const
 
int test_case_to_run_count () const
 
int successful_test_count () const
 
int failed_test_count () const
 
int reportable_disabled_test_count () const
 
int disabled_test_count () const
 
int reportable_test_count () const
 
int total_test_count () const
 
int test_to_run_count () const
 
TimeInMillis start_timestamp () const
 
TimeInMillis elapsed_time () const
 
bool Passed () const
 
bool Failed () const
 
const TestCaseGetTestCase (int i) const
 
TestCaseGetMutableTestCase (int i)
 
TestEventListenerslisteners ()
 
TestResultcurrent_test_result ()
 
const TestResultad_hoc_test_result () const
 
void set_os_stack_trace_getter (OsStackTraceGetterInterface *getter)
 
OsStackTraceGetterInterfaceos_stack_trace_getter ()
 
std::string CurrentOsStackTraceExceptTop (int skip_count) GTEST_NO_INLINE_
 
TestCaseGetTestCase (const char *test_case_name, const char *type_param, Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc)
 
void AddTestInfo (Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc, TestInfo *test_info)
 
void set_current_test_case (TestCase *a_current_test_case)
 
void set_current_test_info (TestInfo *a_current_test_info)
 
void RegisterParameterizedTests ()
 
bool RunAllTests ()
 
void ClearNonAdHocTestResult ()
 
void ClearAdHocTestResult ()
 
void RecordProperty (const TestProperty &test_property)
 
int FilterTests (ReactionToSharding shard_tests)
 
void ListTestsMatchingFilter ()
 
const TestCasecurrent_test_case () const
 
TestInfocurrent_test_info ()
 
const TestInfocurrent_test_info () const
 
std::vector< Environment * > & environments ()
 
std::vector< TraceInfo > & gtest_trace_stack ()
 
const std::vector< TraceInfo > & gtest_trace_stack () const
 
void ConfigureXmlOutput ()
 
void PostFlagParsingInit ()
 
int random_seed () const
 
internal::Randomrandom ()
 
void ShuffleTests ()
 
void UnshuffleTests ()
 
bool catch_exceptions () const
 

Private Member Functions

void set_catch_exceptions (bool value)
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (UnitTestImpl)
 

Private Attributes

UnitTest *const parent_
 
internal::FilePath original_working_dir_
 
DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_
 
DefaultPerThreadTestPartResultReporter default_per_thread_test_part_result_reporter_
 
TestPartResultReporterInterfaceglobal_test_part_result_repoter_
 
internal::Mutex global_test_part_result_reporter_mutex_
 
internal::ThreadLocal< TestPartResultReporterInterface * > per_thread_test_part_result_reporter_
 
std::vector< Environment * > environments_
 
std::vector< TestCase * > test_cases_
 
std::vector< int > test_case_indices_
 
int last_death_test_case_
 
TestCasecurrent_test_case_
 
TestInfocurrent_test_info_
 
TestResult ad_hoc_test_result_
 
TestEventListeners listeners_
 
OsStackTraceGetterInterfaceos_stack_trace_getter_
 
bool post_flag_parse_init_performed_
 
int random_seed_
 
internal::Random random_
 
TimeInMillis start_timestamp_
 
TimeInMillis elapsed_time_
 
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
 
bool catch_exceptions_
 

Friends

class ::testing::UnitTest
 

Detailed Description

Definition at line 909 of file gtest-all.cc.

Member Enumeration Documentation

◆ ReactionToSharding

Enumerator
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 

Definition at line 1127 of file gtest-all.cc.

Constructor & Destructor Documentation

◆ UnitTestImpl()

testing::internal::UnitTestImpl::UnitTestImpl ( UnitTest parent)
explicit

◆ ~UnitTestImpl()

testing::internal::UnitTestImpl::~UnitTestImpl ( )
virtual

Member Function Documentation

◆ ad_hoc_test_result()

const TestResult* testing::internal::UnitTestImpl::ad_hoc_test_result ( ) const
inline

Definition at line 1007 of file gtest-all.cc.

Referenced by testing::UnitTest::ad_hoc_test_result().

◆ AddTestInfo()

void testing::internal::UnitTestImpl::AddTestInfo ( Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc,
TestInfo test_info 
)
inline

◆ catch_exceptions()

bool testing::internal::UnitTestImpl::catch_exceptions ( ) const
inline

Definition at line 1213 of file gtest-all.cc.

◆ ClearAdHocTestResult()

void testing::internal::UnitTestImpl::ClearAdHocTestResult ( )
inline

Definition at line 1117 of file gtest-all.cc.

◆ ClearNonAdHocTestResult()

void testing::internal::UnitTestImpl::ClearNonAdHocTestResult ( )
inline

Definition at line 1112 of file gtest-all.cc.

References testing::TestCase::ClearTestCaseResult(), and testing::internal::ForEach().

Referenced by RunAllTests().

◆ ConfigureXmlOutput()

void testing::internal::UnitTestImpl::ConfigureXmlOutput ( )

◆ current_test_case()

const TestCase* testing::internal::UnitTestImpl::current_test_case ( ) const
inline

◆ current_test_info() [1/2]

TestInfo* testing::internal::UnitTestImpl::current_test_info ( )
inline

◆ current_test_info() [2/2]

const TestInfo* testing::internal::UnitTestImpl::current_test_info ( ) const
inline

Definition at line 1145 of file gtest-all.cc.

◆ current_test_result()

TestResult * testing::internal::UnitTestImpl::current_test_result ( )

◆ CurrentOsStackTraceExceptTop()

std::string testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop ( int  skip_count)

◆ disabled_test_count()

int testing::internal::UnitTestImpl::disabled_test_count ( ) const

◆ elapsed_time()

TimeInMillis testing::internal::UnitTestImpl::elapsed_time ( ) const
inline

Definition at line 974 of file gtest-all.cc.

Referenced by testing::UnitTest::elapsed_time().

◆ environments()

std::vector<Environment*>& testing::internal::UnitTestImpl::environments ( )
inline

Definition at line 1149 of file gtest-all.cc.

Referenced by testing::UnitTest::AddEnvironment().

◆ Failed()

bool testing::internal::UnitTestImpl::Failed ( ) const
inline

Definition at line 981 of file gtest-all.cc.

Referenced by testing::UnitTest::Failed().

◆ failed_test_case_count()

int testing::internal::UnitTestImpl::failed_test_case_count ( ) const

◆ failed_test_count()

int testing::internal::UnitTestImpl::failed_test_count ( ) const

◆ FilterTests()

int testing::internal::UnitTestImpl::FilterTests ( ReactionToSharding  shard_tests)

◆ GetGlobalTestPartResultReporter()

TestPartResultReporterInterface * testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter ( )

◆ GetMutableTestCase()

TestCase* testing::internal::UnitTestImpl::GetMutableTestCase ( int  i)
inline

Definition at line 994 of file gtest-all.cc.

References testing::internal::GetElementOr(), i, and index.

Referenced by testing::UnitTest::GetMutableTestCase(), and RunAllTests().

◆ GetTestCase() [1/2]

TestCase * testing::internal::UnitTestImpl::GetTestCase ( const char *  test_case_name,
const char *  type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)

◆ GetTestCase() [2/2]

const TestCase* testing::internal::UnitTestImpl::GetTestCase ( int  i) const
inline

Definition at line 987 of file gtest-all.cc.

References testing::internal::GetElementOr(), i, and index.

Referenced by testing::UnitTest::GetTestCase().

◆ GetTestPartResultReporterForCurrentThread()

TestPartResultReporterInterface * testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread ( )

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::internal::UnitTestImpl::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( UnitTestImpl  )
private

◆ gtest_trace_stack() [1/2]

std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( )
inline

Definition at line 1152 of file gtest-all.cc.

Referenced by testing::UnitTest::PopGTestTrace().

◆ gtest_trace_stack() [2/2]

const std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( ) const
inline

Definition at line 1155 of file gtest-all.cc.

◆ listeners()

TestEventListeners* testing::internal::UnitTestImpl::listeners ( )
inline

◆ ListTestsMatchingFilter()

void testing::internal::UnitTestImpl::ListTestsMatchingFilter ( )

◆ os_stack_trace_getter()

OsStackTraceGetterInterface * testing::internal::UnitTestImpl::os_stack_trace_getter ( )

◆ Passed()

bool testing::internal::UnitTestImpl::Passed ( ) const
inline

Definition at line 977 of file gtest-all.cc.

Referenced by testing::UnitTest::Passed(), and RunAllTests().

◆ PostFlagParsingInit()

void testing::internal::UnitTestImpl::PostFlagParsingInit ( )

◆ random()

internal::Random* testing::internal::UnitTestImpl::random ( )
inline

Definition at line 1202 of file gtest-all.cc.

Referenced by RunAllTests(), and ShuffleTests().

◆ random_seed()

int testing::internal::UnitTestImpl::random_seed ( ) const
inline

Definition at line 1199 of file gtest-all.cc.

Referenced by testing::UnitTest::random_seed(), and RunAllTests().

◆ RecordProperty()

void testing::internal::UnitTestImpl::RecordProperty ( const TestProperty test_property)

◆ RegisterParameterizedTests()

void testing::internal::UnitTestImpl::RegisterParameterizedTests ( )

Definition at line 3771 of file gtest-all.cc.

Referenced by PostFlagParsingInit().

◆ reportable_disabled_test_count()

int testing::internal::UnitTestImpl::reportable_disabled_test_count ( ) const

◆ reportable_test_count()

int testing::internal::UnitTestImpl::reportable_test_count ( ) const

◆ RunAllTests()

bool testing::internal::UnitTestImpl::RunAllTests ( )

◆ set_catch_exceptions()

void testing::internal::UnitTestImpl::set_catch_exceptions ( bool  value)
inlineprivate

Definition at line 1220 of file gtest-all.cc.

Referenced by testing::UnitTest::Run().

◆ set_current_test_case()

void testing::internal::UnitTestImpl::set_current_test_case ( TestCase a_current_test_case)
inline

Definition at line 1086 of file gtest-all.cc.

Referenced by testing::TestCase::Run().

◆ set_current_test_info()

void testing::internal::UnitTestImpl::set_current_test_info ( TestInfo a_current_test_info)
inline

Definition at line 1093 of file gtest-all.cc.

Referenced by testing::TestInfo::Run().

◆ set_os_stack_trace_getter()

void testing::internal::UnitTestImpl::set_os_stack_trace_getter ( OsStackTraceGetterInterface getter)

Definition at line 6057 of file gtest-all.cc.

References os_stack_trace_getter_.

◆ SetGlobalTestPartResultReporter()

void testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter ( TestPartResultReporterInterface reporter)

◆ SetTestPartResultReporterForCurrentThread()

void testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread ( TestPartResultReporterInterface reporter)

◆ ShuffleTests()

void testing::internal::UnitTestImpl::ShuffleTests ( )

◆ start_timestamp()

TimeInMillis testing::internal::UnitTestImpl::start_timestamp ( ) const
inline

Definition at line 971 of file gtest-all.cc.

Referenced by testing::UnitTest::start_timestamp().

◆ successful_test_case_count()

int testing::internal::UnitTestImpl::successful_test_case_count ( ) const

◆ successful_test_count()

int testing::internal::UnitTestImpl::successful_test_count ( ) const

◆ test_case_to_run_count()

int testing::internal::UnitTestImpl::test_case_to_run_count ( ) const

◆ test_to_run_count()

int testing::internal::UnitTestImpl::test_to_run_count ( ) const

◆ total_test_case_count()

int testing::internal::UnitTestImpl::total_test_case_count ( ) const

Definition at line 2202 of file gtest-all.cc.

References test_cases_.

Referenced by RunAllTests(), and testing::UnitTest::total_test_case_count().

◆ total_test_count()

int testing::internal::UnitTestImpl::total_test_count ( ) const

◆ UnshuffleTests()

void testing::internal::UnitTestImpl::UnshuffleTests ( )

Definition at line 6100 of file gtest-all.cc.

References i, test_case_indices_, and test_cases_.

Referenced by RunAllTests().

Friends And Related Function Documentation

◆ ::testing::UnitTest

friend class ::testing::UnitTest
friend

Definition at line 1216 of file gtest-all.cc.

Member Data Documentation

◆ ad_hoc_test_result_

TestResult testing::internal::UnitTestImpl::ad_hoc_test_result_
private

Definition at line 1290 of file gtest-all.cc.

Referenced by current_test_result(), and RecordProperty().

◆ catch_exceptions_

bool testing::internal::UnitTestImpl::catch_exceptions_
private

Definition at line 1330 of file gtest-all.cc.

◆ current_test_case_

TestCase* testing::internal::UnitTestImpl::current_test_case_
private

Definition at line 1274 of file gtest-all.cc.

Referenced by RecordProperty().

◆ current_test_info_

TestInfo* testing::internal::UnitTestImpl::current_test_info_
private

Definition at line 1280 of file gtest-all.cc.

Referenced by current_test_result(), and RecordProperty().

◆ default_global_test_part_result_reporter_

DefaultGlobalTestPartResultReporter testing::internal::UnitTestImpl::default_global_test_part_result_reporter_
private

Definition at line 1230 of file gtest-all.cc.

◆ default_per_thread_test_part_result_reporter_

DefaultPerThreadTestPartResultReporter testing::internal::UnitTestImpl::default_per_thread_test_part_result_reporter_
private

Definition at line 1232 of file gtest-all.cc.

◆ elapsed_time_

TimeInMillis testing::internal::UnitTestImpl::elapsed_time_
private

Definition at line 1316 of file gtest-all.cc.

Referenced by RunAllTests().

◆ environments_

std::vector<Environment*> testing::internal::UnitTestImpl::environments_
private

Definition at line 1246 of file gtest-all.cc.

Referenced by RunAllTests(), and ~UnitTestImpl().

◆ global_test_part_result_reporter_mutex_

internal::Mutex testing::internal::UnitTestImpl::global_test_part_result_reporter_mutex_
private

◆ global_test_part_result_repoter_

TestPartResultReporterInterface* testing::internal::UnitTestImpl::global_test_part_result_repoter_
private

◆ gtest_trace_stack_

internal::ThreadLocal<std::vector<TraceInfo> > testing::internal::UnitTestImpl::gtest_trace_stack_
private

Definition at line 1326 of file gtest-all.cc.

◆ last_death_test_case_

int testing::internal::UnitTestImpl::last_death_test_case_
private

Definition at line 1268 of file gtest-all.cc.

Referenced by GetTestCase(), and ShuffleTests().

◆ listeners_

TestEventListeners testing::internal::UnitTestImpl::listeners_
private

Definition at line 1294 of file gtest-all.cc.

◆ original_working_dir_

internal::FilePath testing::internal::UnitTestImpl::original_working_dir_
private

Definition at line 1227 of file gtest-all.cc.

Referenced by testing::UnitTest::original_working_dir().

◆ os_stack_trace_getter_

OsStackTraceGetterInterface* testing::internal::UnitTestImpl::os_stack_trace_getter_
private

Definition at line 1300 of file gtest-all.cc.

Referenced by os_stack_trace_getter(), set_os_stack_trace_getter(), and ~UnitTestImpl().

◆ parent_

UnitTest* const testing::internal::UnitTestImpl::parent_
private

Definition at line 1223 of file gtest-all.cc.

Referenced by RunAllTests().

◆ per_thread_test_part_result_reporter_

internal::ThreadLocal<TestPartResultReporterInterface*> testing::internal::UnitTestImpl::per_thread_test_part_result_reporter_
private

◆ post_flag_parse_init_performed_

bool testing::internal::UnitTestImpl::post_flag_parse_init_performed_
private

Definition at line 1303 of file gtest-all.cc.

Referenced by PostFlagParsingInit().

◆ random_

internal::Random testing::internal::UnitTestImpl::random_
private

Definition at line 1309 of file gtest-all.cc.

◆ random_seed_

int testing::internal::UnitTestImpl::random_seed_
private

Definition at line 1306 of file gtest-all.cc.

Referenced by RunAllTests().

◆ start_timestamp_

TimeInMillis testing::internal::UnitTestImpl::start_timestamp_
private

Definition at line 1313 of file gtest-all.cc.

Referenced by RunAllTests().

◆ test_case_indices_

std::vector<int> testing::internal::UnitTestImpl::test_case_indices_
private

Definition at line 1256 of file gtest-all.cc.

Referenced by GetTestCase(), ShuffleTests(), and UnshuffleTests().

◆ test_cases_

std::vector<TestCase*> testing::internal::UnitTestImpl::test_cases_
private

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