Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
testing::internal::UnitTestImpl Class Reference

#include <gtest-internal-inl.h>

Classes

struct  CompareTestSuitesByPointer
 

Public Types

enum  ReactionToSharding { HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL }
 

Public Member Functions

 UnitTestImpl (UnitTest *parent)
 
virtual ~UnitTestImpl ()
 
TestPartResultReporterInterface * GetGlobalTestPartResultReporter ()
 
void SetGlobalTestPartResultReporter (TestPartResultReporterInterface *reporter)
 
TestPartResultReporterInterface * GetTestPartResultReporterForCurrentThread ()
 
void SetTestPartResultReporterForCurrentThread (TestPartResultReporterInterface *reporter)
 
int successful_test_suite_count () const
 
int failed_test_suite_count () const
 
int total_test_suite_count () const
 
int test_suite_to_run_count () const
 
int successful_test_count () const
 
int skipped_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 TestSuiteGetTestSuite (int i) const
 
const TestCaseGetTestCase (int i) const
 
TestSuiteGetMutableSuiteCase (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_ GTEST_NO_TAIL_CALL_
 
TestSuiteGetTestSuite (const std::string &test_suite_name, const char *type_param, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc)
 
TestCaseGetTestCase (const std::string &test_case_name, const char *type_param, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc)
 
void AddTestInfo (internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc, TestInfo *test_info)
 
internal::ParameterizedTestSuiteRegistryparameterized_test_registry ()
 
std::set< std::string > * ignored_parameterized_test_suites ()
 
internal::TypeParameterizedTestSuiteRegistrytype_parameterized_test_registry ()
 
void RegisterParameterizedTests ()
 
bool RunAllTests ()
 
void ClearNonAdHocTestResult ()
 
void ClearAdHocTestResult ()
 
void RecordProperty (const TestProperty &test_property)
 
int FilterTests (ReactionToSharding shard_tests)
 
void ListTestsMatchingFilter ()
 
const TestSuitecurrent_test_suite () 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)
 
void set_current_test_suite (TestSuite *a_current_test_suite)
 
void set_current_test_info (TestInfo *a_current_test_info)
 
 UnitTestImpl (const UnitTestImpl &)=delete
 
UnitTestImploperator= (const UnitTestImpl &)=delete
 

Private Attributes

UnitTest *const parent_
 
DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_
 
DefaultPerThreadTestPartResultReporter default_per_thread_test_part_result_reporter_
 
TestPartResultReporterInterface * global_test_part_result_reporter_
 
internal::Mutex global_test_part_result_reporter_mutex_
 
internal::ThreadLocal
< TestPartResultReporterInterface * > 
per_thread_test_part_result_reporter_
 
std::vector< Environment * > environments_
 
std::vector< TestSuite * > test_suites_
 
std::unordered_map
< std::string, TestSuite * > 
test_suites_by_name_
 
std::vector< int > test_suite_indices_
 
internal::ParameterizedTestSuiteRegistry parameterized_test_registry_
 
internal::TypeParameterizedTestSuiteRegistry type_parameterized_test_registry_
 
std::set< std::string > ignored_parameterized_test_suites_
 
bool parameterized_tests_registered_
 
int last_death_test_suite_
 
TestSuitecurrent_test_suite_
 
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 509 of file gtest-internal-inl.h.

Member Enumeration Documentation

Enumerator
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 

Definition at line 743 of file gtest-internal-inl.h.

Constructor & Destructor Documentation

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

Definition at line 5655 of file gtest.cc.

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

Definition at line 5684 of file gtest.cc.

testing::internal::UnitTestImpl::UnitTestImpl ( const UnitTestImpl )
privatedelete

Member Function Documentation

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

Definition at line 1070 of file gtest.cc.

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

Definition at line 1076 of file gtest.cc.

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

Definition at line 1084 of file gtest.cc.

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

Definition at line 1089 of file gtest.cc.

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

Definition at line 1095 of file gtest.cc.

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

Definition at line 1100 of file gtest.cc.

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

Definition at line 1105 of file gtest.cc.

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

Definition at line 1111 of file gtest.cc.

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

Definition at line 1116 of file gtest.cc.

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

Definition at line 1121 of file gtest.cc.

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

Definition at line 1126 of file gtest.cc.

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

Definition at line 1131 of file gtest.cc.

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

Definition at line 1137 of file gtest.cc.

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

Definition at line 1142 of file gtest.cc.

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

Definition at line 1147 of file gtest.cc.

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

Definition at line 1152 of file gtest.cc.

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

Definition at line 574 of file gtest-internal-inl.h.

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

Definition at line 577 of file gtest-internal-inl.h.

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

Definition at line 581 of file gtest-internal-inl.h.

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

Definition at line 585 of file gtest-internal-inl.h.

const TestSuite* testing::internal::UnitTestImpl::GetTestSuite ( int  i) const
inline

Definition at line 591 of file gtest-internal-inl.h.

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

Definition at line 598 of file gtest-internal-inl.h.

TestSuite* testing::internal::UnitTestImpl::GetMutableSuiteCase ( int  i)
inline

Definition at line 603 of file gtest-internal-inl.h.

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

Definition at line 609 of file gtest-internal-inl.h.

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

Definition at line 6340 of file gtest.cc.

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

Definition at line 616 of file gtest-internal-inl.h.

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

Definition at line 6316 of file gtest.cc.

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

Definition at line 6327 of file gtest.cc.

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

Definition at line 1166 of file gtest.cc.

TestSuite * testing::internal::UnitTestImpl::GetTestSuite ( const std::string &  test_suite_name,
const char *  type_param,
internal::SetUpTestSuiteFunc  set_up_tc,
internal::TearDownTestSuiteFunc  tear_down_tc 
)

Definition at line 5825 of file gtest.cc.

TestCase* testing::internal::UnitTestImpl::GetTestCase ( const std::string &  test_case_name,
const char *  type_param,
internal::SetUpTestSuiteFunc  set_up_tc,
internal::TearDownTestSuiteFunc  tear_down_tc 
)
inline

Definition at line 660 of file gtest-internal-inl.h.

void testing::internal::UnitTestImpl::AddTestInfo ( internal::SetUpTestSuiteFunc  set_up_tc,
internal::TearDownTestSuiteFunc  tear_down_tc,
TestInfo test_info 
)
inline

Definition at line 675 of file gtest-internal-inl.h.

internal::ParameterizedTestSuiteRegistry& testing::internal::UnitTestImpl::parameterized_test_registry ( )
inline

Definition at line 700 of file gtest-internal-inl.h.

std::set<std::string>* testing::internal::UnitTestImpl::ignored_parameterized_test_suites ( )
inline

Definition at line 704 of file gtest-internal-inl.h.

internal::TypeParameterizedTestSuiteRegistry& testing::internal::UnitTestImpl::type_parameterized_test_registry ( )
inline

Definition at line 711 of file gtest-internal-inl.h.

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

Definition at line 2835 of file gtest.cc.

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

Definition at line 5881 of file gtest.cc.

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

Definition at line 730 of file gtest-internal-inl.h.

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

Definition at line 735 of file gtest-internal-inl.h.

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

Definition at line 5699 of file gtest.cc.

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

Definition at line 6180 of file gtest.cc.

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

Definition at line 6257 of file gtest.cc.

const TestSuite* testing::internal::UnitTestImpl::current_test_suite ( ) const
inline

Definition at line 756 of file gtest-internal-inl.h.

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

Definition at line 757 of file gtest-internal-inl.h.

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

Definition at line 758 of file gtest-internal-inl.h.

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

Definition at line 762 of file gtest-internal-inl.h.

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

Definition at line 765 of file gtest-internal-inl.h.

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

Definition at line 768 of file gtest-internal-inl.h.

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

Definition at line 5727 of file gtest.cc.

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

Definition at line 5771 of file gtest.cc.

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

Definition at line 812 of file gtest-internal-inl.h.

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

Definition at line 815 of file gtest-internal-inl.h.

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

Definition at line 6352 of file gtest.cc.

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

Definition at line 6367 of file gtest.cc.

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

Definition at line 826 of file gtest-internal-inl.h.

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

Definition at line 839 of file gtest-internal-inl.h.

void testing::internal::UnitTestImpl::set_current_test_suite ( TestSuite a_current_test_suite)
inlineprivate

Definition at line 842 of file gtest-internal-inl.h.

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

Definition at line 849 of file gtest-internal-inl.h.

UnitTestImpl& testing::internal::UnitTestImpl::operator= ( const UnitTestImpl )
privatedelete

Friends And Related Function Documentation

friend class ::testing::UnitTest
friend

Definition at line 835 of file gtest-internal-inl.h.

Member Data Documentation

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

Definition at line 854 of file gtest-internal-inl.h.

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

Definition at line 863 of file gtest-internal-inl.h.

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

Definition at line 865 of file gtest-internal-inl.h.

TestPartResultReporterInterface* testing::internal::UnitTestImpl::global_test_part_result_reporter_
private

Definition at line 868 of file gtest-internal-inl.h.

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

Definition at line 871 of file gtest-internal-inl.h.

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

Definition at line 875 of file gtest-internal-inl.h.

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

Definition at line 879 of file gtest-internal-inl.h.

std::vector<TestSuite*> testing::internal::UnitTestImpl::test_suites_
private

Definition at line 883 of file gtest-internal-inl.h.

std::unordered_map<std::string, TestSuite*> testing::internal::UnitTestImpl::test_suites_by_name_
private

Definition at line 886 of file gtest-internal-inl.h.

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

Definition at line 892 of file gtest-internal-inl.h.

internal::ParameterizedTestSuiteRegistry testing::internal::UnitTestImpl::parameterized_test_registry_
private

Definition at line 896 of file gtest-internal-inl.h.

internal::TypeParameterizedTestSuiteRegistry testing::internal::UnitTestImpl::type_parameterized_test_registry_
private

Definition at line 898 of file gtest-internal-inl.h.

std::set<std::string> testing::internal::UnitTestImpl::ignored_parameterized_test_suites_
private

Definition at line 902 of file gtest-internal-inl.h.

bool testing::internal::UnitTestImpl::parameterized_tests_registered_
private

Definition at line 905 of file gtest-internal-inl.h.

int testing::internal::UnitTestImpl::last_death_test_suite_
private

Definition at line 908 of file gtest-internal-inl.h.

TestSuite* testing::internal::UnitTestImpl::current_test_suite_
private

Definition at line 914 of file gtest-internal-inl.h.

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

Definition at line 920 of file gtest-internal-inl.h.

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

Definition at line 930 of file gtest-internal-inl.h.

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

Definition at line 934 of file gtest-internal-inl.h.

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

Definition at line 940 of file gtest-internal-inl.h.

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

Definition at line 943 of file gtest-internal-inl.h.

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

Definition at line 946 of file gtest-internal-inl.h.

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

Definition at line 949 of file gtest-internal-inl.h.

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

Definition at line 953 of file gtest-internal-inl.h.

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

Definition at line 956 of file gtest-internal-inl.h.

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

Definition at line 966 of file gtest-internal-inl.h.

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

Definition at line 970 of file gtest-internal-inl.h.


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