proxygen
testing::internal::UnitTestImpl Class Reference

#include <gtest-internal-inl.h>

Public Types

enum  ReactionToSharding {
  HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL, HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL,
  HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL
}
 
enum  ReactionToSharding {
  HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL, HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL,
  HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL
}
 
enum  ReactionToSharding {
  HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL, HONOR_SHARDING_PROTOCOL, IGNORE_SHARDING_PROTOCOL,
  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
 
 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
 
 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)
 
void set_catch_exceptions (bool value)
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (UnitTestImpl)
 
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 499 of file gtest-internal-inl.h.

Member Enumeration Documentation

Enumerator
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 

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

Enumerator
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 

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

Enumerator
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 
HONOR_SHARDING_PROTOCOL 
IGNORE_SHARDING_PROTOCOL 

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

Constructor & Destructor Documentation

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

Definition at line 4325 of file gtest.cc.

References listeners(), and testing::TestEventListeners::SetDefaultResultPrinter().

Referenced by testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4326  : parent_(parent),
4327  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */)
4335 #if GTEST_HAS_PARAM_TEST
4336  parameterized_test_registry_(),
4337  parameterized_tests_registered_(false),
4338 #endif // GTEST_HAS_PARAM_TEST
4340  current_test_case_(NULL),
4341  current_test_info_(NULL),
4343  os_stack_trace_getter_(NULL),
4345  random_seed_(0), // Will be overridden by the flag before first use.
4346  random_(0), // Will be reseeded before first use.
4347  start_timestamp_(0),
4348  elapsed_time_(0),
4349 #if GTEST_HAS_DEATH_TEST
4350  death_test_factory_(new DefaultDeathTestFactory),
4351 #endif
4352  // Will be overridden by the flag before first use.
4353  catch_exceptions_(false) {
4354  listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
4355 }
void SetDefaultResultPrinter(TestEventListener *listener)
Definition: gtest.cc:3926
#define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
Definition: gtest-port.h:317
internal::ThreadLocal< TestPartResultReporterInterface * > per_thread_test_part_result_reporter_
TestPartResultReporterInterface * global_test_part_result_repoter_
OsStackTraceGetterInterface * os_stack_trace_getter_
TestEventListeners * listeners()
DefaultPerThreadTestPartResultReporter default_per_thread_test_part_result_reporter_
#define GTEST_DISABLE_MSC_WARNINGS_POP_()
Definition: gtest-port.h:318
DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_
folly::Function< void()> parent
Definition: AtFork.cpp:34
testing::internal::UnitTestImpl::~UnitTestImpl ( )
virtual

Definition at line 4357 of file gtest.cc.

References environments_, testing::internal::ForEach(), os_stack_trace_getter_, and test_cases_.

Referenced by testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4357  {
4358  // Deletes every TestCase.
4359  ForEach(test_cases_, internal::Delete<TestCase>);
4360 
4361  // Deletes every Environment.
4362  ForEach(environments_, internal::Delete<Environment>);
4363 
4364  delete os_stack_trace_getter_;
4365 }
std::vector< TestCase * > test_cases_
std::vector< Environment * > environments_
OsStackTraceGetterInterface * os_stack_trace_getter_
void ForEach(const Container &c, Functor functor)
testing::internal::UnitTestImpl::UnitTestImpl ( UnitTest parent)
explicit
virtual testing::internal::UnitTestImpl::~UnitTestImpl ( )
virtual
testing::internal::UnitTestImpl::UnitTestImpl ( UnitTest parent)
explicit
virtual testing::internal::UnitTestImpl::~UnitTestImpl ( )
virtual

Member Function Documentation

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

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

References GTEST_NO_INLINE_, and string.

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

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

References GTEST_NO_INLINE_, and string.

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

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

References GTEST_NO_INLINE_, and string.

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

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

References testing::internal::FilePath::GetCurrentDir(), GTEST_CHECK_, original_working_dir_, testing::TestInfo::test_case_name(), and testing::TestInfo::type_param().

647  {
648  // In order to support thread-safe death tests, we need to
649  // remember the original working directory when the test program
650  // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
651  // the user may have changed the current directory before calling
652  // RUN_ALL_TESTS(). Therefore we capture the current directory in
653  // AddTestInfo(), which is called to register a TEST or TEST_F
654  // before main() is reached.
658  << "Failed to get the current working directory.";
659  }
660 
661  GetTestCase(test_info->test_case_name(),
662  test_info->type_param(),
663  set_up_tc,
664  tear_down_tc)->AddTestInfo(test_info);
665  }
internal::FilePath original_working_dir_
void Set(const FilePath &rhs)
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc, TestInfo *test_info)
#define GTEST_CHECK_(condition)
Definition: gtest-port.h:1295
const TestCase * GetTestCase(int i) const
static FilePath GetCurrentDir()
void testing::internal::UnitTestImpl::AddTestInfo ( Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc,
TestInfo test_info 
)
inline

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

References testing::internal::FilePath::GetCurrentDir(), GTEST_CHECK_, original_working_dir_, testing::TestInfo::test_case_name(), and testing::TestInfo::type_param().

647  {
648  // In order to support thread-safe death tests, we need to
649  // remember the original working directory when the test program
650  // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
651  // the user may have changed the current directory before calling
652  // RUN_ALL_TESTS(). Therefore we capture the current directory in
653  // AddTestInfo(), which is called to register a TEST or TEST_F
654  // before main() is reached.
658  << "Failed to get the current working directory.";
659  }
660 
661  GetTestCase(test_info->test_case_name(),
662  test_info->type_param(),
663  set_up_tc,
664  tear_down_tc)->AddTestInfo(test_info);
665  }
internal::FilePath original_working_dir_
void Set(const FilePath &rhs)
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc, TestInfo *test_info)
#define GTEST_CHECK_(condition)
Definition: gtest-port.h:1295
const TestCase * GetTestCase(int i) const
static FilePath GetCurrentDir()
void testing::internal::UnitTestImpl::AddTestInfo ( Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc,
TestInfo test_info 
)
inline

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

References testing::internal::FilePath::GetCurrentDir(), GTEST_CHECK_, original_working_dir_, testing::TestInfo::test_case_name(), and testing::TestInfo::type_param().

Referenced by testing::internal::MakeAndRegisterTestInfo(), and testing::TestPartNonfatallyFailed().

647  {
648  // In order to support thread-safe death tests, we need to
649  // remember the original working directory when the test program
650  // was first invoked. We cannot do this in RUN_ALL_TESTS(), as
651  // the user may have changed the current directory before calling
652  // RUN_ALL_TESTS(). Therefore we capture the current directory in
653  // AddTestInfo(), which is called to register a TEST or TEST_F
654  // before main() is reached.
658  << "Failed to get the current working directory.";
659  }
660 
661  GetTestCase(test_info->test_case_name(),
662  test_info->type_param(),
663  set_up_tc,
664  tear_down_tc)->AddTestInfo(test_info);
665  }
internal::FilePath original_working_dir_
void Set(const FilePath &rhs)
void AddTestInfo(Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc, TestInfo *test_info)
#define GTEST_CHECK_(condition)
Definition: gtest-port.h:1295
const TestCase * GetTestCase(int i) const
static FilePath GetCurrentDir()
bool testing::internal::UnitTestImpl::catch_exceptions ( ) const
inline
bool testing::internal::UnitTestImpl::catch_exceptions ( ) const
inline
bool testing::internal::UnitTestImpl::catch_exceptions ( ) const
inline
void testing::internal::UnitTestImpl::ClearAdHocTestResult ( )
inline

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

707  {
709  }
void testing::internal::UnitTestImpl::ClearAdHocTestResult ( )
inline

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

707  {
709  }
void testing::internal::UnitTestImpl::ClearAdHocTestResult ( )
inline

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

707  {
709  }
void testing::internal::UnitTestImpl::ClearNonAdHocTestResult ( )
inline

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

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

702  {
704  }
std::vector< TestCase * > test_cases_
static void ClearTestCaseResult(TestCase *test_case)
Definition: gtest.h:878
void ForEach(const Container &c, Functor functor)
void testing::internal::UnitTestImpl::ClearNonAdHocTestResult ( )
inline

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

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

Referenced by RunAllTests().

702  {
704  }
std::vector< TestCase * > test_cases_
static void ClearTestCaseResult(TestCase *test_case)
Definition: gtest.h:878
void ForEach(const Container &c, Functor functor)
void testing::internal::UnitTestImpl::ClearNonAdHocTestResult ( )
inline

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

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

702  {
704  }
std::vector< TestCase * > test_cases_
static void ClearTestCaseResult(TestCase *test_case)
Definition: gtest.h:878
void ForEach(const Container &c, Functor functor)
void testing::internal::UnitTestImpl::ConfigureXmlOutput ( )
void testing::internal::UnitTestImpl::ConfigureXmlOutput ( )

Definition at line 4400 of file gtest.cc.

References testing::TestEventListeners::Append(), testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(), testing::internal::UnitTestOptions::GetOutputFormat(), GTEST_FLAG, listeners(), testing::TestEventListeners::SetDefaultXmlGenerator(), and string.

Referenced by PostFlagParsingInit(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4400  {
4401  const std::string& output_format = UnitTestOptions::GetOutputFormat();
4402  if (output_format == "xml") {
4403  listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
4405  } else if (output_format != "") {
4406  printf("WARNING: unrecognized output format \"%s\" ignored.\n",
4407  output_format.c_str());
4408  fflush(stdout);
4409  }
4410 }
static std::string GetAbsolutePathToOutputFile()
Definition: gtest.cc:426
static std::string GetOutputFormat()
Definition: gtest.cc:414
void SetDefaultXmlGenerator(TestEventListener *listener)
Definition: gtest.cc:3942
TestEventListeners * listeners()
const char * string
Definition: Conv.cpp:212
void testing::internal::UnitTestImpl::ConfigureXmlOutput ( )
const TestCase* testing::internal::UnitTestImpl::current_test_case ( ) const
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

TestResult* testing::internal::UnitTestImpl::current_test_result ( )
TestResult* testing::internal::UnitTestImpl::current_test_result ( )
std::string testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop ( int  skip_count)
std::string testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop ( int  skip_count)
std::string testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop ( int  skip_count)

Definition at line 796 of file gtest.cc.

References GTEST_FLAG.

Referenced by testing::internal::GetCurrentOsStackTraceExceptTop(), testing::internal::AssertHelper::operator=(), testing::internal::PrintOnOneLine(), and testing::internal::ShouldRunTestCase().

796  {
798  static_cast<int>(GTEST_FLAG(stack_trace_depth)),
799  skip_count + 1
800  // Skips the user-specified number of frames plus this function
801  // itself.
802  ); // NOLINT
803 }
#define GTEST_FLAG(name)
Definition: gtest-port.h:2504
OsStackTraceGetterInterface * os_stack_trace_getter()
Definition: gtest.cc:4918
virtual string CurrentStackTrace(int max_depth, int skip_count)=0
int testing::internal::UnitTestImpl::disabled_test_count ( ) const

Definition at line 767 of file gtest.cc.

References testing::TestCase::disabled_test_count(), and testing::internal::SumOverTestCaseList().

Referenced by testing::internal::ShouldRunTestCase().

767  {
769 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int disabled_test_count() const
Definition: gtest.cc:2692
int testing::internal::UnitTestImpl::disabled_test_count ( ) const
int testing::internal::UnitTestImpl::disabled_test_count ( ) const
TimeInMillis testing::internal::UnitTestImpl::elapsed_time ( ) const
inline

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

564 { return elapsed_time_; }
TimeInMillis testing::internal::UnitTestImpl::elapsed_time ( ) const
inline

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

564 { return elapsed_time_; }
TimeInMillis testing::internal::UnitTestImpl::elapsed_time ( ) const
inline

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

564 { return elapsed_time_; }
std::vector<Environment*>& testing::internal::UnitTestImpl::environments ( )
inline

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

739 { return environments_; }
std::vector< Environment * > environments_
std::vector<Environment*>& testing::internal::UnitTestImpl::environments ( )
inline

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

739 { return environments_; }
std::vector< Environment * > environments_
std::vector<Environment*>& testing::internal::UnitTestImpl::environments ( )
inline

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

739 { return environments_; }
std::vector< Environment * > environments_
bool testing::internal::UnitTestImpl::Failed ( ) const
inline

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

571  {
572  return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
573  }
const TestResult * ad_hoc_test_result() const
bool Failed() const
Definition: gtest.cc:2170
int failed_test_case_count() const
Definition: gtest.cc:735
bool testing::internal::UnitTestImpl::Failed ( ) const
inline

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

571  {
572  return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
573  }
const TestResult * ad_hoc_test_result() const
bool Failed() const
Definition: gtest.cc:2170
int failed_test_case_count() const
Definition: gtest.cc:735
bool testing::internal::UnitTestImpl::Failed ( ) const
inline

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

571  {
572  return failed_test_case_count() > 0 || ad_hoc_test_result()->Failed();
573  }
const TestResult * ad_hoc_test_result() const
bool Failed() const
Definition: gtest.cc:2170
int failed_test_case_count() const
Definition: gtest.cc:735
int testing::internal::UnitTestImpl::failed_test_case_count ( ) const

Definition at line 735 of file gtest.cc.

References testing::internal::CountIf(), and testing::internal::TestCaseFailed().

Referenced by testing::internal::ShouldRunTestCase().

735  {
737 }
std::vector< TestCase * > test_cases_
int CountIf(const Container &c, Predicate predicate)
static bool TestCaseFailed(const TestCase *test_case)
Definition: gtest.cc:350
int testing::internal::UnitTestImpl::failed_test_case_count ( ) const
int testing::internal::UnitTestImpl::failed_test_case_count ( ) const
int testing::internal::UnitTestImpl::failed_test_count ( ) const

Definition at line 756 of file gtest.cc.

References testing::TestCase::failed_test_count(), and testing::internal::SumOverTestCaseList().

Referenced by testing::internal::ShouldRunTestCase().

756  {
758 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int failed_test_count() const
Definition: gtest.cc:2682
int testing::internal::UnitTestImpl::failed_test_count ( ) const
int testing::internal::UnitTestImpl::failed_test_count ( ) const
int testing::internal::UnitTestImpl::FilterTests ( ReactionToSharding  shard_tests)
int testing::internal::UnitTestImpl::FilterTests ( ReactionToSharding  shard_tests)

Definition at line 4789 of file gtest.cc.

References testing::internal::UnitTestOptions::FilterMatchesTest(), GTEST_FLAG, HONOR_SHARDING_PROTOCOL, i, IGNORE_SHARDING_PROTOCOL, testing::internal::Int32FromEnvOrDie(), testing::TestInfo::is_disabled_, testing::TestInfo::matches_filter_, testing::internal::UnitTestOptions::MatchesFilter(), testing::TestInfo::name(), testing::TestCase::name(), testing::TestCase::set_should_run(), testing::TestCase::should_run(), testing::TestInfo::should_run_, testing::internal::ShouldRunTestOnShard(), string, test_cases_, and testing::TestCase::test_info_list().

Referenced by RunAllTests(), and testing::internal::TearDownEnvironment().

4789  {
4790  const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
4792  const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ?
4794 
4795  // num_runnable_tests are the number of tests that will
4796  // run across all shards (i.e., match filter and are not disabled).
4797  // num_selected_tests are the number of tests to be run on
4798  // this shard.
4799  int num_runnable_tests = 0;
4800  int num_selected_tests = 0;
4801  for (size_t i = 0; i < test_cases_.size(); i++) {
4802  TestCase* const test_case = test_cases_[i];
4803  const std::string &test_case_name = test_case->name();
4804  test_case->set_should_run(false);
4805 
4806  for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
4807  TestInfo* const test_info = test_case->test_info_list()[j];
4808  const std::string test_name(test_info->name());
4809  // A test is disabled if test case name or test name matches
4810  // kDisableTestFilter.
4811  const bool is_disabled =
4813  kDisableTestFilter) ||
4816  test_info->is_disabled_ = is_disabled;
4817 
4818  const bool matches_filter =
4820  test_name);
4821  test_info->matches_filter_ = matches_filter;
4822 
4823  const bool is_runnable =
4824  (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) &&
4825  matches_filter;
4826 
4827  const bool is_selected = is_runnable &&
4828  (shard_tests == IGNORE_SHARDING_PROTOCOL ||
4829  ShouldRunTestOnShard(total_shards, shard_index,
4830  num_runnable_tests));
4831 
4832  num_runnable_tests += is_runnable;
4833  num_selected_tests += is_selected;
4834 
4835  test_info->should_run_ = is_selected;
4836  test_case->set_should_run(test_case->should_run() || is_selected);
4837  }
4838  }
4839  return num_selected_tests;
4840 }
#define GTEST_FLAG(name)
Definition: gtest-port.h:2504
std::vector< TestCase * > test_cases_
static const char kDisableTestFilter[]
Definition: gtest.cc:160
TypeWithSize< 4 >::Int Int32
Definition: gtest-port.h:2494
GTEST_API_ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id)
Definition: gtest.cc:4778
static const char kTestTotalShards[]
Definition: gtest.cc:176
const char * string
Definition: Conv.cpp:212
static const char kTestShardIndex[]
Definition: gtest.cc:174
static bool FilterMatchesTest(const std::string &test_case_name, const std::string &test_name)
Definition: gtest.cc:502
GTEST_API_ Int32 Int32FromEnvOrDie(const char *env_var, Int32 default_val)
Definition: gtest.cc:4760
static bool MatchesFilter(const std::string &name, const char *filter)
Definition: gtest.cc:479
int testing::internal::UnitTestImpl::FilterTests ( ReactionToSharding  shard_tests)
TestPartResultReporterInterface * testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter ( )

Definition at line 705 of file gtest.cc.

References folly::detail::lock().

Referenced by testing::ScopedFakeTestPartResultReporter::Init(), testing::internal::DefaultPerThreadTestPartResultReporter::ReportTestPartResult(), and testing::internal::ShouldRunTestCase().

705  {
708 }
internal::Mutex global_test_part_result_reporter_mutex_
TestPartResultReporterInterface * global_test_part_result_repoter_
auto lock(SynchronizedLocker...lockersIn) -> std::tuple< typename SynchronizedLocker::LockedPtr... >
Definition: Synchronized.h:871
GTestMutexLock MutexLock
Definition: gtest-port.h:2159
TestPartResultReporterInterface* testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter ( )
TestPartResultReporterInterface* testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter ( )
TestCase* testing::internal::UnitTestImpl::GetMutableTestCase ( int  i)
inline

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

References testing::internal::GetElementOr().

584  {
585  const int index = GetElementOr(test_case_indices_, i, -1);
586  return index < 0 ? NULL : test_cases_[index];
587  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
TestCase* testing::internal::UnitTestImpl::GetMutableTestCase ( int  i)
inline

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

References testing::internal::GetElementOr().

Referenced by RunAllTests().

584  {
585  const int index = GetElementOr(test_case_indices_, i, -1);
586  return index < 0 ? NULL : test_cases_[index];
587  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
TestCase* testing::internal::UnitTestImpl::GetMutableTestCase ( int  i)
inline

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

References testing::internal::GetElementOr().

584  {
585  const int index = GetElementOr(test_case_indices_, i, -1);
586  return index < 0 ? NULL : test_cases_[index];
587  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
const TestCase* testing::internal::UnitTestImpl::GetTestCase ( int  i) const
inline

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

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

577  {
578  const int index = GetElementOr(test_case_indices_, i, -1);
579  return index < 0 ? NULL : test_cases_[i];
580  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
const TestCase* testing::internal::UnitTestImpl::GetTestCase ( int  i) const
inline

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

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

Referenced by testing::internal::TestCaseNameIs::operator()().

577  {
578  const int index = GetElementOr(test_case_indices_, i, -1);
579  return index < 0 ? NULL : test_cases_[i];
580  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
const TestCase* testing::internal::UnitTestImpl::GetTestCase ( int  i) const
inline

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

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

577  {
578  const int index = GetElementOr(test_case_indices_, i, -1);
579  return index < 0 ? NULL : test_cases_[i];
580  }
std::vector< TestCase * > test_cases_
E GetElementOr(const std::vector< E > &v, int i, E default_value)
TestCase* testing::internal::UnitTestImpl::GetTestCase ( const char *  test_case_name,
const char *  type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)
TestCase* testing::internal::UnitTestImpl::GetTestCase ( const char *  test_case_name,
const char *  type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)
TestCase * testing::internal::UnitTestImpl::GetTestCase ( const char *  test_case_name,
const char *  type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)

Definition at line 4502 of file gtest.cc.

References last_death_test_case_, testing::internal::UnitTestOptions::MatchesFilter(), test_case_indices_, test_cases_, and gmock_test_utils::TestCase.

4505  {
4506  // Can we find a TestCase with the given name?
4507  const std::vector<TestCase*>::const_iterator test_case =
4508  std::find_if(test_cases_.begin(), test_cases_.end(),
4509  TestCaseNameIs(test_case_name));
4510 
4511  if (test_case != test_cases_.end())
4512  return *test_case;
4513 
4514  // No. Let's create one.
4515  TestCase* const new_test_case =
4516  new TestCase(test_case_name, type_param, set_up_tc, tear_down_tc);
4517 
4518  // Is this a death test case?
4519  if (internal::UnitTestOptions::MatchesFilter(test_case_name,
4521  // Yes. Inserts the test case after the last death test case
4522  // defined so far. This only works when the test cases haven't
4523  // been shuffled. Otherwise we may end up running a death test
4524  // after a non-death test.
4527  new_test_case);
4528  } else {
4529  // No. Appends to the end of the list.
4530  test_cases_.push_back(new_test_case);
4531  }
4532 
4533  test_case_indices_.push_back(static_cast<int>(test_case_indices_.size()));
4534  return new_test_case;
4535 }
std::vector< TestCase * > test_cases_
static const char kDeathTestCaseFilter[]
Definition: gtest.cc:165
static bool MatchesFilter(const std::string &name, const char *filter)
Definition: gtest.cc:479
TestPartResultReporterInterface * testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread ( )

Definition at line 719 of file gtest.cc.

Referenced by testing::ScopedFakeTestPartResultReporter::Init(), and testing::internal::ShouldRunTestCase().

719  {
721 }
internal::ThreadLocal< TestPartResultReporterInterface * > per_thread_test_part_result_reporter_
TestPartResultReporterInterface* testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread ( )
TestPartResultReporterInterface* testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread ( )
testing::internal::UnitTestImpl::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( UnitTestImpl  )
private
testing::internal::UnitTestImpl::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( UnitTestImpl  )
private
testing::internal::UnitTestImpl::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( UnitTestImpl  )
private
std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( )
inline

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

742  {
743  return *(gtest_trace_stack_.pointer());
744  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( )
inline

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

742  {
743  return *(gtest_trace_stack_.pointer());
744  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( )
inline

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

742  {
743  return *(gtest_trace_stack_.pointer());
744  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
const std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( ) const
inline

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

745  {
746  return gtest_trace_stack_.get();
747  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
const std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( ) const
inline

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

745  {
746  return gtest_trace_stack_.get();
747  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
const std::vector<TraceInfo>& testing::internal::UnitTestImpl::gtest_trace_stack ( ) const
inline

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

745  {
746  return gtest_trace_stack_.get();
747  }
internal::ThreadLocal< std::vector< TraceInfo > > gtest_trace_stack_
TestEventListeners* testing::internal::UnitTestImpl::listeners ( )
inline

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

590 { return &listeners_; }
TestEventListeners* testing::internal::UnitTestImpl::listeners ( )
inline

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

590 { return &listeners_; }
void testing::internal::UnitTestImpl::ListTestsMatchingFilter ( )

Definition at line 4865 of file gtest.cc.

References i, testing::TestInfo::matches_filter_, testing::TestInfo::name(), testing::TestCase::name(), testing::internal::PrintOnOneLine(), test_cases_, testing::TestCase::test_info_list(), testing::TestCase::type_param(), and testing::TestInfo::value_param().

Referenced by testing::internal::PrintOnOneLine(), and RunAllTests().

4865  {
4866  // Print at most this many characters for each type/value parameter.
4867  const int kMaxParamLength = 250;
4868 
4869  for (size_t i = 0; i < test_cases_.size(); i++) {
4870  const TestCase* const test_case = test_cases_[i];
4871  bool printed_test_case_name = false;
4872 
4873  for (size_t j = 0; j < test_case->test_info_list().size(); j++) {
4874  const TestInfo* const test_info =
4875  test_case->test_info_list()[j];
4876  if (test_info->matches_filter_) {
4877  if (!printed_test_case_name) {
4878  printed_test_case_name = true;
4879  printf("%s.", test_case->name());
4880  if (test_case->type_param() != NULL) {
4881  printf(" # %s = ", kTypeParamLabel);
4882  // We print the type parameter on a single line to make
4883  // the output easy to parse by a program.
4884  PrintOnOneLine(test_case->type_param(), kMaxParamLength);
4885  }
4886  printf("\n");
4887  }
4888  printf(" %s", test_info->name());
4889  if (test_info->value_param() != NULL) {
4890  printf(" # %s = ", kValueParamLabel);
4891  // We print the value parameter on a single line to make the
4892  // output easy to parse by a program.
4893  PrintOnOneLine(test_info->value_param(), kMaxParamLength);
4894  }
4895  printf("\n");
4896  }
4897  }
4898  }
4899  fflush(stdout);
4900 }
std::vector< TestCase * > test_cases_
static const char kValueParamLabel[]
Definition: gtest.cc:3007
static void PrintOnOneLine(const char *str, int max_length)
Definition: gtest.cc:4846
static const char kTypeParamLabel[]
Definition: gtest.cc:3006
void testing::internal::UnitTestImpl::ListTestsMatchingFilter ( )
void testing::internal::UnitTestImpl::ListTestsMatchingFilter ( )
OsStackTraceGetterInterface* testing::internal::UnitTestImpl::os_stack_trace_getter ( )
OsStackTraceGetterInterface* testing::internal::UnitTestImpl::os_stack_trace_getter ( )
OsStackTraceGetterInterface * testing::internal::UnitTestImpl::os_stack_trace_getter ( )

Definition at line 4918 of file gtest.cc.

References os_stack_trace_getter_.

Referenced by testing::internal::PrintOnOneLine(), testing::Test::Run(), testing::TestInfo::Run(), testing::TestCase::Run(), and testing::TestPartNonfatallyFailed().

4918  {
4919  if (os_stack_trace_getter_ == NULL) {
4920 #ifdef GTEST_OS_STACK_TRACE_GETTER_
4921  os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_;
4922 #else
4923  os_stack_trace_getter_ = new OsStackTraceGetter;
4924 #endif // GTEST_OS_STACK_TRACE_GETTER_
4925  }
4926 
4927  return os_stack_trace_getter_;
4928 }
OsStackTraceGetterInterface * os_stack_trace_getter_
bool testing::internal::UnitTestImpl::Passed ( ) const
inline

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

Referenced by RunAllTests().

567 { return !Failed(); }
bool testing::internal::UnitTestImpl::Passed ( ) const
inline

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

567 { return !Failed(); }
bool testing::internal::UnitTestImpl::Passed ( ) const
inline

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

567 { return !Failed(); }
void testing::internal::UnitTestImpl::PostFlagParsingInit ( )

Definition at line 4436 of file gtest.cc.

References testing::TestEventListeners::Append(), ConfigureXmlOutput(), listeners(), post_flag_parse_init_performed_, and RegisterParameterizedTests().

Referenced by testing::internal::InitGoogleTestImpl(), RunAllTests(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4436  {
4437  // Ensures that this function does not execute more than once.
4440 
4441 #if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
4442  // Register to send notifications about key process state changes.
4443  listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_());
4444 #endif // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
4445 
4446 #if GTEST_HAS_DEATH_TEST
4447  InitDeathTestSubprocessControlInfo();
4448  SuppressTestEventsIfInSubprocess();
4449 #endif // GTEST_HAS_DEATH_TEST
4450 
4451  // Registers parameterized tests. This makes parameterized tests
4452  // available to the UnitTest reflection API without running
4453  // RUN_ALL_TESTS.
4455 
4456  // Configures listeners for XML output. This makes it possible for users
4457  // to shut down the default XML output before invoking RUN_ALL_TESTS.
4459 
4460 #if GTEST_CAN_STREAM_RESULTS_
4461  // Configures listeners for streaming test results to the specified server.
4462  ConfigureStreamingOutput();
4463 #endif // GTEST_CAN_STREAM_RESULTS_
4464  }
4465 }
void Append(TestEventListener *listener)
Definition: gtest.cc:3902
TestEventListeners * listeners()
void testing::internal::UnitTestImpl::PostFlagParsingInit ( )
void testing::internal::UnitTestImpl::PostFlagParsingInit ( )
internal::Random* testing::internal::UnitTestImpl::random ( )
inline

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

792 { return &random_; }
internal::Random* testing::internal::UnitTestImpl::random ( )
inline

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

Referenced by RunAllTests(), and ShuffleTests().

792 { return &random_; }
internal::Random* testing::internal::UnitTestImpl::random ( )
inline

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

792 { return &random_; }
int testing::internal::UnitTestImpl::random_seed ( ) const
inline
int testing::internal::UnitTestImpl::random_seed ( ) const
inline
int testing::internal::UnitTestImpl::random_seed ( ) const
inline
void testing::internal::UnitTestImpl::RecordProperty ( const TestProperty test_property)
void testing::internal::UnitTestImpl::RecordProperty ( const TestProperty test_property)

Definition at line 4372 of file gtest.cc.

References ad_hoc_test_result_, testing::TestCase::ad_hoc_test_result_, current_test_case_, current_test_info_, listeners(), testing::TestResult::RecordProperty(), testing::TestInfo::result_, string, and testing::TestEventListeners::SuppressEventForwarding().

Referenced by testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4372  {
4373  std::string xml_element;
4374  TestResult* test_result; // TestResult appropriate for property recording.
4375 
4376  if (current_test_info_ != NULL) {
4377  xml_element = "testcase";
4378  test_result = &(current_test_info_->result_);
4379  } else if (current_test_case_ != NULL) {
4380  xml_element = "testsuite";
4381  test_result = &(current_test_case_->ad_hoc_test_result_);
4382  } else {
4383  xml_element = "testsuites";
4384  test_result = &ad_hoc_test_result_;
4385  }
4386  test_result->RecordProperty(xml_element, test_property);
4387 }
void RecordProperty(const std::string &xml_element, const TestProperty &test_property)
Definition: gtest.cc:2057
TestResult result_
Definition: gtest.h:770
TestResult ad_hoc_test_result_
Definition: gtest.h:952
const char * string
Definition: Conv.cpp:212
void testing::internal::UnitTestImpl::RecordProperty ( const TestProperty test_property)
void testing::internal::UnitTestImpl::RegisterParameterizedTests ( )
void testing::internal::UnitTestImpl::RegisterParameterizedTests ( )

Definition at line 2617 of file gtest.cc.

Referenced by PostFlagParsingInit().

2617  {
2618 #if GTEST_HAS_PARAM_TEST
2619  if (!parameterized_tests_registered_) {
2620  parameterized_test_registry_.RegisterTests();
2621  parameterized_tests_registered_ = true;
2622  }
2623 #endif
2624 }
void testing::internal::UnitTestImpl::RegisterParameterizedTests ( )
int testing::internal::UnitTestImpl::reportable_disabled_test_count ( ) const
int testing::internal::UnitTestImpl::reportable_disabled_test_count ( ) const
int testing::internal::UnitTestImpl::reportable_disabled_test_count ( ) const

Definition at line 761 of file gtest.cc.

References testing::TestCase::reportable_disabled_test_count(), and testing::internal::SumOverTestCaseList().

Referenced by testing::internal::ShouldRunTestCase().

761  {
764 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int reportable_disabled_test_count() const
Definition: gtest.cc:2687
int testing::internal::UnitTestImpl::reportable_test_count ( ) const
int testing::internal::UnitTestImpl::reportable_test_count ( ) const

Definition at line 772 of file gtest.cc.

References testing::TestCase::reportable_test_count(), and testing::internal::SumOverTestCaseList().

Referenced by testing::internal::ShouldRunTestCase().

772  {
774 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int reportable_test_count() const
Definition: gtest.cc:2697
int testing::internal::UnitTestImpl::reportable_test_count ( ) const
bool testing::internal::UnitTestImpl::RunAllTests ( )

Definition at line 4551 of file gtest.cc.

References ClearNonAdHocTestResult(), elapsed_time_, environments_, failed, FilterTests(), for_each(), testing::internal::ForEach(), forever, testing::internal::g_help_flag, GetMutableTestCase(), testing::internal::GetNextRandomSeed(), testing::internal::GetRandomSeedFromFlag(), testing::internal::GetTimeInMillis(), GTEST_FLAG, testing::internal::GTestIsInitialized(), testing::Test::HasFatalFailure(), HONOR_SHARDING_PROTOCOL, i, IGNORE_SHARDING_PROTOCOL, listeners(), ListTestsMatchingFilter(), testing::TestEventListener::OnEnvironmentsSetUpEnd(), testing::TestEventListener::OnEnvironmentsSetUpStart(), testing::TestEventListener::OnEnvironmentsTearDownEnd(), testing::TestEventListener::OnEnvironmentsTearDownStart(), testing::TestEventListener::OnTestIterationEnd(), testing::TestEventListener::OnTestIterationStart(), testing::TestEventListener::OnTestProgramEnd(), testing::TestEventListener::OnTestProgramStart(), parent_, Passed(), PostFlagParsingInit(), random(), random_seed(), random_seed_, repeat(), testing::TestEventListeners::repeater(), testing::internal::Random::Reseed(), testing::TestCase::Run(), testing::internal::SetUpEnvironment(), testing::internal::ShouldShard(), ShuffleTests(), start, start_timestamp_, testing::internal::TearDownEnvironment(), total_test_case_count(), UnshuffleTests(), and testing::internal::WriteToShardStatusFileIfNeeded().

Referenced by testing::UnitTest::Run(), testing::internal::TearDownEnvironment(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

4551  {
4552  // Makes sure InitGoogleTest() was called.
4553  if (!GTestIsInitialized()) {
4554  printf("%s",
4555  "\nThis test program did NOT call ::testing::InitGoogleTest "
4556  "before calling RUN_ALL_TESTS(). Please fix it.\n");
4557  return false;
4558  }
4559 
4560  // Do not run any test if the --help flag was specified.
4561  if (g_help_flag)
4562  return true;
4563 
4564  // Repeats the call to the post-flag parsing initialization in case the
4565  // user didn't call InitGoogleTest.
4567 
4568  // Even if sharding is not on, test runners may want to use the
4569  // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
4570  // protocol.
4572 
4573  // True iff we are in a subprocess for running a thread-safe-style
4574  // death test.
4575  bool in_subprocess_for_death_test = false;
4576 
4577 #if GTEST_HAS_DEATH_TEST
4578  in_subprocess_for_death_test = (internal_run_death_test_flag_.get() != NULL);
4579 # if defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
4580  if (in_subprocess_for_death_test) {
4581  GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_();
4582  }
4583 # endif // defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
4584 #endif // GTEST_HAS_DEATH_TEST
4585 
4586  const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
4587  in_subprocess_for_death_test);
4588 
4589  // Compares the full test names with the filter to decide which
4590  // tests to run.
4591  const bool has_tests_to_run = FilterTests(should_shard
4593  : IGNORE_SHARDING_PROTOCOL) > 0;
4594 
4595  // Lists the tests and exits if the --gtest_list_tests flag was specified.
4596  if (GTEST_FLAG(list_tests)) {
4597  // This must be called *after* FilterTests() has been called.
4599  return true;
4600  }
4601 
4602  random_seed_ = GTEST_FLAG(shuffle) ?
4604 
4605  // True iff at least one test has failed.
4606  bool failed = false;
4607 
4608  TestEventListener* repeater = listeners()->repeater();
4609 
4611  repeater->OnTestProgramStart(*parent_);
4612 
4613  // How many times to repeat the tests? We don't want to repeat them
4614  // when we are inside the subprocess of a death test.
4615  const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat);
4616  // Repeats forever if the repeat count is negative.
4617  const bool forever = repeat < 0;
4618  for (int i = 0; forever || i != repeat; i++) {
4619  // We want to preserve failures generated by ad-hoc test
4620  // assertions executed before RUN_ALL_TESTS().
4622 
4624 
4625  // Shuffles test cases and tests if requested.
4626  if (has_tests_to_run && GTEST_FLAG(shuffle)) {
4628  // This should be done before calling OnTestIterationStart(),
4629  // such that a test event listener can see the actual test order
4630  // in the event.
4631  ShuffleTests();
4632  }
4633 
4634  // Tells the unit test event listeners that the tests are about to start.
4635  repeater->OnTestIterationStart(*parent_, i);
4636 
4637  // Runs each test case if there is at least one test to run.
4638  if (has_tests_to_run) {
4639  // Sets up all environments beforehand.
4640  repeater->OnEnvironmentsSetUpStart(*parent_);
4642  repeater->OnEnvironmentsSetUpEnd(*parent_);
4643 
4644  // Runs the tests only if there was no fatal failure during global
4645  // set-up.
4646  if (!Test::HasFatalFailure()) {
4647  for (int test_index = 0; test_index < total_test_case_count();
4648  test_index++) {
4649  GetMutableTestCase(test_index)->Run();
4650  }
4651  }
4652 
4653  // Tears down all environments in reverse order afterwards.
4654  repeater->OnEnvironmentsTearDownStart(*parent_);
4655  std::for_each(environments_.rbegin(), environments_.rend(),
4657  repeater->OnEnvironmentsTearDownEnd(*parent_);
4658  }
4659 
4661 
4662  // Tells the unit test event listener that the tests have just finished.
4663  repeater->OnTestIterationEnd(*parent_, i);
4664 
4665  // Gets the result and clears it.
4666  if (!Passed()) {
4667  failed = true;
4668  }
4669 
4670  // Restores the original test order after the iteration. This
4671  // allows the user to quickly repro a failure that happens in the
4672  // N-th iteration without repeating the first (N - 1) iterations.
4673  // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
4674  // case the user somehow changes the value of the flag somewhere
4675  // (it's always safe to unshuffle the tests).
4676  UnshuffleTests();
4677 
4678  if (GTEST_FLAG(shuffle)) {
4679  // Picks a new random seed for each iteration.
4681  }
4682  }
4683 
4684  repeater->OnTestProgramEnd(*parent_);
4685 
4686  return !failed;
4687 }
GTEST_API_ bool g_help_flag
Definition: gtest.cc:188
#define GTEST_FLAG(name)
Definition: gtest-port.h:2504
int GetRandomSeedFromFlag(Int32 random_seed_flag)
static bool HasFatalFailure()
Definition: gtest.cc:2487
int GetNextRandomSeed(int seed)
TestEventListener * repeater()
Definition: gtest.cc:3919
static auto const forever
static bool failed
GTEST_API_ bool ShouldShard(const char *total_shards_str, const char *shard_index_str, bool in_subprocess_for_death_test)
Definition: gtest.cc:4715
static void SetUpEnvironment(Environment *env)
Definition: gtest.cc:4539
static const char kTestTotalShards[]
Definition: gtest.cc:176
std::vector< Environment * > environments_
void Reseed(UInt32 seed)
static bool GTestIsInitialized()
Definition: gtest.cc:330
void repeat(F const &func)
GTEST_API_ TimeInMillis GetTimeInMillis()
Definition: gtest.cc:806
int total_test_case_count() const
Definition: gtest.cc:740
auto start
int FilterTests(ReactionToSharding shard_tests)
Definition: gtest.cc:4789
TestEventListeners * listeners()
static const char kTestShardIndex[]
Definition: gtest.cc:174
static void TearDownEnvironment(Environment *env)
Definition: gtest.cc:4540
void for_each(T const &range, Function< void(typename T::value_type const &) const > const &func)
TypeWithSize< 8 >::Int TimeInMillis
Definition: gtest-port.h:2498
void ForEach(const Container &c, Functor functor)
void WriteToShardStatusFileIfNeeded()
Definition: gtest.cc:4693
bool testing::internal::UnitTestImpl::RunAllTests ( )
bool testing::internal::UnitTestImpl::RunAllTests ( )
void testing::internal::UnitTestImpl::set_catch_exceptions ( bool  value)
inlineprivate

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

References testing::internal::GTestFlagSaver::catch_exceptions_, and value.

static const char *const value
Definition: Conv.cpp:50
void testing::internal::UnitTestImpl::set_current_test_case ( TestCase a_current_test_case)
inline

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

676  {
677  current_test_case_ = a_current_test_case;
678  }
void testing::internal::UnitTestImpl::set_current_test_case ( TestCase a_current_test_case)
inline

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

676  {
677  current_test_case_ = a_current_test_case;
678  }
void testing::internal::UnitTestImpl::set_current_test_case ( TestCase a_current_test_case)
inline

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

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

676  {
677  current_test_case_ = a_current_test_case;
678  }
void testing::internal::UnitTestImpl::set_current_test_info ( TestInfo a_current_test_info)
inline

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

References RunAllTests().

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

683  {
684  current_test_info_ = a_current_test_info;
685  }
void testing::internal::UnitTestImpl::set_current_test_info ( TestInfo a_current_test_info)
inline

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

References RunAllTests().

683  {
684  current_test_info_ = a_current_test_info;
685  }
void testing::internal::UnitTestImpl::set_current_test_info ( TestInfo a_current_test_info)
inline

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

References RunAllTests().

683  {
684  current_test_info_ = a_current_test_info;
685  }
void testing::internal::UnitTestImpl::set_os_stack_trace_getter ( OsStackTraceGetterInterface getter)

Definition at line 4907 of file gtest.cc.

References os_stack_trace_getter_.

Referenced by testing::internal::PrintOnOneLine().

4908  {
4909  if (os_stack_trace_getter_ != getter) {
4910  delete os_stack_trace_getter_;
4911  os_stack_trace_getter_ = getter;
4912  }
4913 }
OsStackTraceGetterInterface * os_stack_trace_getter_
void testing::internal::UnitTestImpl::set_os_stack_trace_getter ( OsStackTraceGetterInterface getter)
void testing::internal::UnitTestImpl::set_os_stack_trace_getter ( OsStackTraceGetterInterface getter)
void testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter ( TestPartResultReporterInterface reporter)

Definition at line 711 of file gtest.cc.

References folly::detail::lock().

Referenced by testing::ScopedFakeTestPartResultReporter::Init(), testing::internal::ShouldRunTestCase(), and testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter().

712  {
715 }
internal::Mutex global_test_part_result_reporter_mutex_
TestPartResultReporterInterface * global_test_part_result_repoter_
auto lock(SynchronizedLocker...lockersIn) -> std::tuple< typename SynchronizedLocker::LockedPtr... >
Definition: Synchronized.h:871
GTestMutexLock MutexLock
Definition: gtest-port.h:2159
void testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter ( TestPartResultReporterInterface reporter)
void testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter ( TestPartResultReporterInterface reporter)
void testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread ( TestPartResultReporterInterface reporter)
void testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread ( TestPartResultReporterInterface reporter)
void testing::internal::UnitTestImpl::ShuffleTests ( )

Definition at line 4939 of file gtest.cc.

References i, last_death_test_case_, random(), testing::internal::ShuffleRange(), test_case_indices_, and test_cases_.

Referenced by testing::internal::PrintOnOneLine(), and RunAllTests().

4939  {
4940  // Shuffles the death test cases.
4942 
4943  // Shuffles the non-death test cases.
4945  static_cast<int>(test_cases_.size()), &test_case_indices_);
4946 
4947  // Shuffles the tests inside each test case.
4948  for (size_t i = 0; i < test_cases_.size(); i++) {
4949  test_cases_[i]->ShuffleTests(random());
4950  }
4951 }
std::vector< TestCase * > test_cases_
void ShuffleRange(internal::Random *random, int begin, int end, std::vector< E > *v)
void testing::internal::UnitTestImpl::ShuffleTests ( )
void testing::internal::UnitTestImpl::ShuffleTests ( )
TimeInMillis testing::internal::UnitTestImpl::start_timestamp ( ) const
inline

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

561 { return start_timestamp_; }
TimeInMillis testing::internal::UnitTestImpl::start_timestamp ( ) const
inline

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

561 { return start_timestamp_; }
TimeInMillis testing::internal::UnitTestImpl::start_timestamp ( ) const
inline

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

561 { return start_timestamp_; }
int testing::internal::UnitTestImpl::successful_test_case_count ( ) const
int testing::internal::UnitTestImpl::successful_test_case_count ( ) const

Definition at line 730 of file gtest.cc.

References testing::internal::CountIf(), and testing::internal::TestCasePassed().

Referenced by testing::internal::ShouldRunTestCase().

730  {
732 }
std::vector< TestCase * > test_cases_
int CountIf(const Container &c, Predicate predicate)
static bool TestCasePassed(const TestCase *test_case)
Definition: gtest.cc:345
int testing::internal::UnitTestImpl::successful_test_case_count ( ) const
int testing::internal::UnitTestImpl::successful_test_count ( ) const

Definition at line 751 of file gtest.cc.

References testing::TestCase::successful_test_count(), and testing::internal::SumOverTestCaseList().

Referenced by testing::internal::ShouldRunTestCase().

751  {
753 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int successful_test_count() const
Definition: gtest.cc:2677
int testing::internal::UnitTestImpl::successful_test_count ( ) const
int testing::internal::UnitTestImpl::successful_test_count ( ) const
int testing::internal::UnitTestImpl::test_case_to_run_count ( ) const

Definition at line 746 of file gtest.cc.

References testing::internal::CountIf(), and testing::internal::ShouldRunTestCase().

Referenced by testing::internal::ShouldRunTestCase().

746  {
748 }
std::vector< TestCase * > test_cases_
static bool ShouldRunTestCase(const TestCase *test_case)
Definition: gtest.cc:356
int CountIf(const Container &c, Predicate predicate)
int testing::internal::UnitTestImpl::test_case_to_run_count ( ) const
int testing::internal::UnitTestImpl::test_case_to_run_count ( ) const
int testing::internal::UnitTestImpl::test_to_run_count ( ) const
int testing::internal::UnitTestImpl::test_to_run_count ( ) const
int testing::internal::UnitTestImpl::test_to_run_count ( ) const

Definition at line 782 of file gtest.cc.

References testing::internal::SumOverTestCaseList(), and testing::TestCase::test_to_run_count().

Referenced by testing::internal::ShouldRunTestCase().

782  {
784 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int test_to_run_count() const
Definition: gtest.cc:2702
int testing::internal::UnitTestImpl::total_test_case_count ( ) const
int testing::internal::UnitTestImpl::total_test_case_count ( ) const

Definition at line 740 of file gtest.cc.

Referenced by RunAllTests(), and testing::internal::ShouldRunTestCase().

740  {
741  return static_cast<int>(test_cases_.size());
742 }
std::vector< TestCase * > test_cases_
int testing::internal::UnitTestImpl::total_test_case_count ( ) const
int testing::internal::UnitTestImpl::total_test_count ( ) const

Definition at line 777 of file gtest.cc.

References testing::internal::SumOverTestCaseList(), and testing::TestCase::total_test_count().

Referenced by testing::internal::ShouldRunTestCase().

777  {
779 }
std::vector< TestCase * > test_cases_
static int SumOverTestCaseList(const std::vector< TestCase * > &case_list, int(TestCase::*method)() const)
Definition: gtest.cc:335
int total_test_count() const
Definition: gtest.cc:2707
int testing::internal::UnitTestImpl::total_test_count ( ) const
int testing::internal::UnitTestImpl::total_test_count ( ) const
void testing::internal::UnitTestImpl::UnshuffleTests ( )

Definition at line 4954 of file gtest.cc.

References i, test_case_indices_, and test_cases_.

Referenced by testing::internal::PrintOnOneLine(), and RunAllTests().

4954  {
4955  for (size_t i = 0; i < test_cases_.size(); i++) {
4956  // Unshuffles the tests in each test case.
4957  test_cases_[i]->UnshuffleTests();
4958  // Resets the index of each test case.
4959  test_case_indices_[i] = static_cast<int>(i);
4960  }
4961 }
std::vector< TestCase * > test_cases_
void testing::internal::UnitTestImpl::UnshuffleTests ( )
void testing::internal::UnitTestImpl::UnshuffleTests ( )

Friends And Related Function Documentation

friend class ::testing::UnitTest
friend

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

Member Data Documentation

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

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

Referenced by current_test_result(), and RecordProperty().

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

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

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

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

Referenced by RecordProperty().

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

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

Referenced by current_test_result(), and RecordProperty().

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

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

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

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

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

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

Referenced by RunAllTests().

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

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

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

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

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

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

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

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

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

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

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

Referenced by GetTestCase(), and ShuffleTests().

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

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

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

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

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

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

Referenced by RunAllTests().

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

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

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

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

Referenced by PostFlagParsingInit().

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

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

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

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

Referenced by RunAllTests().

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

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

Referenced by RunAllTests().

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

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

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

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

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