proxygen
testing::TestCase Class Reference

#include <gtest.h>

Public Member Functions

 TestCase (const char *name, const char *a_type_param, Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc)
 
virtual ~TestCase ()
 
const char * name () const
 
const char * type_param () const
 
bool should_run () 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 test_to_run_count () const
 
int total_test_count () const
 
bool Passed () const
 
bool Failed () const
 
TimeInMillis elapsed_time () const
 
const TestInfoGetTestInfo (int i) const
 
const TestResultad_hoc_test_result () const
 
 TestCase (const char *name, const char *a_type_param, Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc)
 
virtual ~TestCase ()
 
const char * name () const
 
const char * type_param () const
 
bool should_run () 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 test_to_run_count () const
 
int total_test_count () const
 
bool Passed () const
 
bool Failed () const
 
TimeInMillis elapsed_time () const
 
const TestInfoGetTestInfo (int i) const
 
const TestResultad_hoc_test_result () const
 
 TestCase (const char *name, const char *a_type_param, Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc)
 
virtual ~TestCase ()
 
const char * name () const
 
const char * type_param () const
 
bool should_run () 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 test_to_run_count () const
 
int total_test_count () const
 
bool Passed () const
 
bool Failed () const
 
TimeInMillis elapsed_time () const
 
const TestInfoGetTestInfo (int i) const
 
const TestResultad_hoc_test_result () const
 

Private Member Functions

std::vector< TestInfo * > & test_info_list ()
 
const std::vector< TestInfo * > & test_info_list () const
 
TestInfoGetMutableTestInfo (int i)
 
void set_should_run (bool should)
 
void AddTestInfo (TestInfo *test_info)
 
void ClearResult ()
 
void Run ()
 
void RunSetUpTestCase ()
 
void RunTearDownTestCase ()
 
void ShuffleTests (internal::Random *random)
 
void UnshuffleTests ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestCase)
 
std::vector< TestInfo * > & test_info_list ()
 
const std::vector< TestInfo * > & test_info_list () const
 
TestInfoGetMutableTestInfo (int i)
 
void set_should_run (bool should)
 
void AddTestInfo (TestInfo *test_info)
 
void ClearResult ()
 
void Run ()
 
void RunSetUpTestCase ()
 
void RunTearDownTestCase ()
 
void ShuffleTests (internal::Random *random)
 
void UnshuffleTests ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestCase)
 
std::vector< TestInfo * > & test_info_list ()
 
const std::vector< TestInfo * > & test_info_list () const
 
TestInfoGetMutableTestInfo (int i)
 
void set_should_run (bool should)
 
void AddTestInfo (TestInfo *test_info)
 
void ClearResult ()
 
void Run ()
 
void RunSetUpTestCase ()
 
void RunTearDownTestCase ()
 
void ShuffleTests (internal::Random *random)
 
void UnshuffleTests ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestCase)
 

Static Private Member Functions

static void ClearTestCaseResult (TestCase *test_case)
 
static bool TestPassed (const TestInfo *test_info)
 
static bool TestFailed (const TestInfo *test_info)
 
static bool TestReportableDisabled (const TestInfo *test_info)
 
static bool TestDisabled (const TestInfo *test_info)
 
static bool TestReportable (const TestInfo *test_info)
 
static bool ShouldRunTest (const TestInfo *test_info)
 
static void ClearTestCaseResult (TestCase *test_case)
 
static bool TestPassed (const TestInfo *test_info)
 
static bool TestFailed (const TestInfo *test_info)
 
static bool TestReportableDisabled (const TestInfo *test_info)
 
static bool TestDisabled (const TestInfo *test_info)
 
static bool TestReportable (const TestInfo *test_info)
 
static bool ShouldRunTest (const TestInfo *test_info)
 
static void ClearTestCaseResult (TestCase *test_case)
 
static bool TestPassed (const TestInfo *test_info)
 
static bool TestFailed (const TestInfo *test_info)
 
static bool TestReportableDisabled (const TestInfo *test_info)
 
static bool TestDisabled (const TestInfo *test_info)
 
static bool TestReportable (const TestInfo *test_info)
 
static bool ShouldRunTest (const TestInfo *test_info)
 

Private Attributes

std::string name_
 
const internal::scoped_ptr< const ::std::stringtype_param_
 
std::vector< TestInfo * > test_info_list_
 
std::vector< int > test_indices_
 
Test::SetUpTestCaseFunc set_up_tc_
 
Test::TearDownTestCaseFunc tear_down_tc_
 
bool should_run_
 
TimeInMillis elapsed_time_
 
TestResult ad_hoc_test_result_
 

Friends

class Test
 
class internal::UnitTestImpl
 

Detailed Description

Definition at line 778 of file gtest.h.

Constructor & Destructor Documentation

testing::TestCase::TestCase ( const char *  name,
const char *  a_type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)

Definition at line 2720 of file gtest.cc.

2723  : name_(a_name),
2724  type_param_(a_type_param ? new std::string(a_type_param) : NULL),
2725  set_up_tc_(set_up_tc),
2726  tear_down_tc_(tear_down_tc),
2727  should_run_(false),
2728  elapsed_time_(0) {
2729 }
std::string name_
Definition: gtest.h:931
TimeInMillis elapsed_time_
Definition: gtest.h:949
bool should_run_
Definition: gtest.h:947
Test::SetUpTestCaseFunc set_up_tc_
Definition: gtest.h:943
const internal::scoped_ptr< const ::std::string > type_param_
Definition: gtest.h:934
Test::TearDownTestCaseFunc tear_down_tc_
Definition: gtest.h:945
const char * string
Definition: Conv.cpp:212
testing::TestCase::~TestCase ( )
virtual

Definition at line 2732 of file gtest.cc.

References testing::internal::ForEach(), and test_info_list_.

2732  {
2733  // Deletes every Test in the collection.
2734  ForEach(test_info_list_, internal::Delete<TestInfo>);
2735 }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
void ForEach(const Container &c, Functor functor)
testing::TestCase::TestCase ( const char *  name,
const char *  a_type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)
virtual testing::TestCase::~TestCase ( )
virtual
testing::TestCase::TestCase ( const char *  name,
const char *  a_type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)
virtual testing::TestCase::~TestCase ( )
virtual

Member Function Documentation

const TestResult& testing::TestCase::ad_hoc_test_result ( ) const
inline
const TestResult& testing::TestCase::ad_hoc_test_result ( ) const
inline

Definition at line 849 of file gtest.h.

849 { return ad_hoc_test_result_; }
TestResult ad_hoc_test_result_
Definition: gtest.h:952
const TestResult& testing::TestCase::ad_hoc_test_result ( ) const
inline

Definition at line 849 of file gtest.h.

849 { return ad_hoc_test_result_; }
TestResult ad_hoc_test_result_
Definition: gtest.h:952
void testing::TestCase::AddTestInfo ( TestInfo test_info)
private

Definition at line 2753 of file gtest.cc.

References test_indices_, and test_info_list_.

2753  {
2754  test_info_list_.push_back(test_info);
2755  test_indices_.push_back(static_cast<int>(test_indices_.size()));
2756 }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
std::vector< int > test_indices_
Definition: gtest.h:941
void testing::TestCase::AddTestInfo ( TestInfo test_info)
private
void testing::TestCase::AddTestInfo ( TestInfo test_info)
private
void testing::TestCase::ClearResult ( )
private

Definition at line 2787 of file gtest.cc.

References ad_hoc_test_result_, testing::TestResult::Clear(), testing::TestInfo::ClearTestResult(), testing::internal::ForEach(), and test_info_list_.

Referenced by ClearTestCaseResult().

2787  {
2790 }
static void ClearTestResult(TestInfo *test_info)
Definition: gtest.h:746
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
TestResult ad_hoc_test_result_
Definition: gtest.h:952
void ForEach(const Container &c, Functor functor)
void testing::TestCase::ClearResult ( )
private
void testing::TestCase::ClearResult ( )
private
static void testing::TestCase::ClearTestCaseResult ( TestCase test_case)
inlinestaticprivate

Definition at line 878 of file gtest.h.

References ClearResult(), and Run().

Referenced by testing::internal::UnitTestImpl::ClearNonAdHocTestResult().

878  {
879  test_case->ClearResult();
880  }
static void testing::TestCase::ClearTestCaseResult ( TestCase test_case)
inlinestaticprivate

Definition at line 878 of file gtest.h.

References ClearResult(), and Run().

878  {
879  test_case->ClearResult();
880  }
static void testing::TestCase::ClearTestCaseResult ( TestCase test_case)
inlinestaticprivate

Definition at line 878 of file gtest.h.

References ClearResult(), and Run().

878  {
879  test_case->ClearResult();
880  }
int testing::TestCase::disabled_test_count ( ) const
int testing::TestCase::disabled_test_count ( ) const
int testing::TestCase::disabled_test_count ( ) const

Definition at line 2692 of file gtest.cc.

References testing::internal::CountIf().

Referenced by testing::internal::UnitTestImpl::disabled_test_count(), testing::internal::UnitTestHelper::GetSortedTests(), testing::internal::ShouldRunTestCase(), and testing::internal::TEST().

2692  {
2694 }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
int CountIf(const Container &c, Predicate predicate)
static bool TestDisabled(const TestInfo *test_info)
Definition: gtest.h:910
TimeInMillis testing::TestCase::elapsed_time ( ) const
inline

Definition at line 841 of file gtest.h.

References i.

841 { return elapsed_time_; }
TimeInMillis elapsed_time_
Definition: gtest.h:949
TimeInMillis testing::TestCase::elapsed_time ( ) const
inline

Definition at line 841 of file gtest.h.

References i.

841 { return elapsed_time_; }
TimeInMillis elapsed_time_
Definition: gtest.h:949
bool testing::TestCase::Failed ( ) const
inline

Definition at line 838 of file gtest.h.

838 { return failed_test_count() > 0; }
int failed_test_count() const
Definition: gtest.cc:2682
bool testing::TestCase::Failed ( ) const
inline

Definition at line 838 of file gtest.h.

838 { return failed_test_count() > 0; }
int failed_test_count() const
Definition: gtest.cc:2682
bool testing::TestCase::Failed ( ) const
inline

Definition at line 838 of file gtest.h.

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

838 { return failed_test_count() > 0; }
int failed_test_count() const
Definition: gtest.cc:2682
int testing::TestCase::failed_test_count ( ) const
int testing::TestCase::failed_test_count ( ) const
TestInfo * testing::TestCase::GetMutableTestInfo ( int  i)
private

Definition at line 2746 of file gtest.cc.

References testing::internal::GetElementOr(), test_indices_, and test_info_list_.

Referenced by Run().

2746  {
2747  const int index = GetElementOr(test_indices_, i, -1);
2748  return index < 0 ? NULL : test_info_list_[index];
2749 }
E GetElementOr(const std::vector< E > &v, int i, E default_value)
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
std::vector< int > test_indices_
Definition: gtest.h:941
TestInfo* testing::TestCase::GetMutableTestInfo ( int  i)
private
TestInfo* testing::TestCase::GetMutableTestInfo ( int  i)
private
const TestInfo* testing::TestCase::GetTestInfo ( int  i) const
const TestInfo* testing::TestCase::GetTestInfo ( int  i) const
testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private
testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private
testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private
const char* testing::TestCase::name ( ) const
inline

Definition at line 800 of file gtest.h.

References name_.

800 { return name_.c_str(); }
std::string name_
Definition: gtest.h:931
const char* testing::TestCase::name ( ) const
inline

Definition at line 800 of file gtest.h.

References name_.

800 { return name_.c_str(); }
std::string name_
Definition: gtest.h:931
bool testing::TestCase::Passed ( ) const
inline

Definition at line 835 of file gtest.h.

835 { return !Failed(); }
bool Failed() const
Definition: gtest.h:838
bool testing::TestCase::Passed ( ) const
inline

Definition at line 835 of file gtest.h.

Referenced by testing::internal::TestResultAccessor::test_part_results(), and testing::internal::TestCasePassed().

835 { return !Failed(); }
bool Failed() const
Definition: gtest.h:838
bool testing::TestCase::Passed ( ) const
inline

Definition at line 835 of file gtest.h.

835 { return !Failed(); }
bool Failed() const
Definition: gtest.h:838
int testing::TestCase::reportable_disabled_test_count ( ) const
int testing::TestCase::reportable_disabled_test_count ( ) const
int testing::TestCase::reportable_disabled_test_count ( ) const

Definition at line 2687 of file gtest.cc.

References testing::internal::CountIf().

Referenced by testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::UnitTestImpl::reportable_disabled_test_count(), and testing::internal::ShouldRunTestCase().

2687  {
2689 }
static bool TestReportableDisabled(const TestInfo *test_info)
Definition: gtest.h:905
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
int CountIf(const Container &c, Predicate predicate)
int testing::TestCase::reportable_test_count ( ) const
int testing::TestCase::reportable_test_count ( ) const

Definition at line 2697 of file gtest.cc.

References testing::internal::CountIf().

Referenced by testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::UnitTestImpl::reportable_test_count(), and testing::internal::ShouldRunTestCase().

2697  {
2699 }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
int CountIf(const Container &c, Predicate predicate)
static bool TestReportable(const TestInfo *test_info)
Definition: gtest.h:915
int testing::TestCase::reportable_test_count ( ) const
void testing::TestCase::Run ( )
private
void testing::TestCase::Run ( )
private

Definition at line 2759 of file gtest.cc.

References elapsed_time_, testing::UnitTest::GetInstance(), GetMutableTestInfo(), testing::internal::GetTimeInMillis(), testing::internal::GetUnitTestImpl(), testing::internal::HandleExceptionsInMethodIfSupported(), i, testing::UnitTest::listeners(), testing::TestEventListener::OnTestCaseEnd(), testing::TestEventListener::OnTestCaseStart(), testing::internal::UnitTestImpl::os_stack_trace_getter(), testing::TestEventListeners::repeater(), testing::TestInfo::Run(), RunSetUpTestCase(), RunTearDownTestCase(), testing::internal::UnitTestImpl::set_current_test_case(), should_run_, start, total_test_count(), and testing::internal::OsStackTraceGetterInterface::UponLeavingGTest().

Referenced by testing::internal::UnitTestImpl::RunAllTests().

2759  {
2760  if (!should_run_) return;
2761 
2763  impl->set_current_test_case(this);
2764 
2765  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
2766 
2767  repeater->OnTestCaseStart(*this);
2768  impl->os_stack_trace_getter()->UponLeavingGTest();
2770  this, &TestCase::RunSetUpTestCase, "SetUpTestCase()");
2771 
2773  for (int i = 0; i < total_test_count(); i++) {
2774  GetMutableTestInfo(i)->Run();
2775  }
2777 
2778  impl->os_stack_trace_getter()->UponLeavingGTest();
2780  this, &TestCase::RunTearDownTestCase, "TearDownTestCase()");
2781 
2782  repeater->OnTestCaseEnd(*this);
2783  impl->set_current_test_case(NULL);
2784 }
class UnitTestImpl * GetUnitTestImpl()
Result HandleExceptionsInMethodIfSupported(T *object, Result(T::*method)(), const char *location)
Definition: gtest.cc:2410
TestEventListener * repeater()
Definition: gtest.cc:3919
TimeInMillis elapsed_time_
Definition: gtest.h:949
int total_test_count() const
Definition: gtest.cc:2707
TestEventListeners & listeners()
Definition: gtest.cc:4081
TestInfo * GetMutableTestInfo(int i)
Definition: gtest.cc:2746
friend class internal::UnitTestImpl
Definition: gtest.h:853
bool should_run_
Definition: gtest.h:947
GTEST_API_ TimeInMillis GetTimeInMillis()
Definition: gtest.cc:806
auto start
virtual void OnTestCaseStart(const TestCase &test_case)=0
void RunTearDownTestCase()
Definition: gtest.h:891
static UnitTest * GetInstance()
Definition: gtest.cc:3972
TypeWithSize< 8 >::Int TimeInMillis
Definition: gtest-port.h:2498
void RunSetUpTestCase()
Definition: gtest.h:887
void testing::TestCase::Run ( )
private
void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 887 of file gtest.h.

887 { (*set_up_tc_)(); }
void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 887 of file gtest.h.

Referenced by Run().

887 { (*set_up_tc_)(); }
void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 887 of file gtest.h.

887 { (*set_up_tc_)(); }
void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 891 of file gtest.h.

891 { (*tear_down_tc_)(); }
void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 891 of file gtest.h.

Referenced by Run().

891 { (*tear_down_tc_)(); }
void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 891 of file gtest.h.

891 { (*tear_down_tc_)(); }
void testing::TestCase::set_should_run ( bool  should)
inlineprivate

Definition at line 868 of file gtest.h.

Referenced by testing::internal::UnitTestImpl::FilterTests(), and testing::internal::TearDownEnvironment().

868 { should_run_ = should; }
bool should_run_
Definition: gtest.h:947
void testing::TestCase::set_should_run ( bool  should)
inlineprivate

Definition at line 868 of file gtest.h.

868 { should_run_ = should; }
bool should_run_
Definition: gtest.h:947
void testing::TestCase::set_should_run ( bool  should)
inlineprivate

Definition at line 868 of file gtest.h.

868 { should_run_ = should; }
bool should_run_
Definition: gtest.h:947
bool testing::TestCase::should_run ( ) const
inline

Definition at line 811 of file gtest.h.

811 { return should_run_; }
bool should_run_
Definition: gtest.h:947
bool testing::TestCase::should_run ( ) const
inline

Definition at line 811 of file gtest.h.

811 { return should_run_; }
bool should_run_
Definition: gtest.h:947
static bool testing::TestCase::ShouldRunTest ( const TestInfo test_info)
inlinestaticprivate

Definition at line 920 of file gtest.h.

References GTEST_DISALLOW_COPY_AND_ASSIGN_, name_, random(), testing::TestInfo::should_run(), and string.

920  {
921  return test_info->should_run();
922  }
static bool testing::TestCase::ShouldRunTest ( const TestInfo test_info)
inlinestaticprivate

Definition at line 920 of file gtest.h.

References GTEST_DISALLOW_COPY_AND_ASSIGN_, name_, random(), testing::TestInfo::should_run(), and string.

920  {
921  return test_info->should_run();
922  }
static bool testing::TestCase::ShouldRunTest ( const TestInfo test_info)
inlinestaticprivate

Definition at line 920 of file gtest.h.

References random(), and testing::TestInfo::should_run().

920  {
921  return test_info->should_run();
922  }
void testing::TestCase::ShuffleTests ( internal::Random random)
private
void testing::TestCase::ShuffleTests ( internal::Random random)
private

Definition at line 2793 of file gtest.cc.

References testing::internal::Shuffle(), and test_indices_.

2793  {
2795 }
Integral2 random(Integral1 low, Integral2 up)
std::vector< int > test_indices_
Definition: gtest.h:941
void Shuffle(internal::Random *random, std::vector< E > *v)
void testing::TestCase::ShuffleTests ( internal::Random random)
private
int testing::TestCase::successful_test_count ( ) const
int testing::TestCase::successful_test_count ( ) const
int testing::TestCase::successful_test_count ( ) const

Definition at line 2677 of file gtest.cc.

References testing::internal::CountIf().

Referenced by testing::internal::ShouldRunTestCase(), and testing::internal::UnitTestImpl::successful_test_count().

2677  {
2679 }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
static bool TestPassed(const TestInfo *test_info)
Definition: gtest.h:894
int CountIf(const Container &c, Predicate predicate)
std::vector<TestInfo*>& testing::TestCase::test_info_list ( )
inlineprivate

Definition at line 856 of file gtest.h.

856 { return test_info_list_; }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
std::vector<TestInfo*>& testing::TestCase::test_info_list ( )
inlineprivate

Definition at line 856 of file gtest.h.

856 { return test_info_list_; }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
const std::vector<TestInfo*>& testing::TestCase::test_info_list ( ) const
inlineprivate

Definition at line 859 of file gtest.h.

859  {
860  return test_info_list_;
861  }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
const std::vector<TestInfo*>& testing::TestCase::test_info_list ( ) const
inlineprivate

Definition at line 859 of file gtest.h.

859  {
860  return test_info_list_;
861  }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
const std::vector<TestInfo*>& testing::TestCase::test_info_list ( ) const
inlineprivate

Definition at line 859 of file gtest.h.

859  {
860  return test_info_list_;
861  }
std::vector< TestInfo * > test_info_list_
Definition: gtest.h:937
int testing::TestCase::test_to_run_count ( ) const
int testing::TestCase::test_to_run_count ( ) const
static bool testing::TestCase::TestDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 910 of file gtest.h.

References testing::TestInfo::is_disabled_.

910  {
911  return test_info->is_disabled_;
912  }
static bool testing::TestCase::TestDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 910 of file gtest.h.

References testing::TestInfo::is_disabled_.

910  {
911  return test_info->is_disabled_;
912  }
static bool testing::TestCase::TestDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 910 of file gtest.h.

References testing::TestInfo::is_disabled_.

910  {
911  return test_info->is_disabled_;
912  }
static bool testing::TestCase::TestFailed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 899 of file gtest.h.

References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

899  {
900  return test_info->should_run() && test_info->result()->Failed();
901  }
static bool testing::TestCase::TestFailed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 899 of file gtest.h.

References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

899  {
900  return test_info->should_run() && test_info->result()->Failed();
901  }
static bool testing::TestCase::TestFailed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 899 of file gtest.h.

References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

899  {
900  return test_info->should_run() && test_info->result()->Failed();
901  }
static bool testing::TestCase::TestPassed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 894 of file gtest.h.

References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

894  {
895  return test_info->should_run() && test_info->result()->Passed();
896  }
static bool testing::TestCase::TestPassed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 894 of file gtest.h.

References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

894  {
895  return test_info->should_run() && test_info->result()->Passed();
896  }
static bool testing::TestCase::TestPassed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 894 of file gtest.h.

References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().

894  {
895  return test_info->should_run() && test_info->result()->Passed();
896  }
static bool testing::TestCase::TestReportable ( const TestInfo test_info)
inlinestaticprivate

Definition at line 915 of file gtest.h.

References testing::TestInfo::is_reportable().

915  {
916  return test_info->is_reportable();
917  }
static bool testing::TestCase::TestReportable ( const TestInfo test_info)
inlinestaticprivate

Definition at line 915 of file gtest.h.

References testing::TestInfo::is_reportable().

915  {
916  return test_info->is_reportable();
917  }
static bool testing::TestCase::TestReportable ( const TestInfo test_info)
inlinestaticprivate

Definition at line 915 of file gtest.h.

References testing::TestInfo::is_reportable().

915  {
916  return test_info->is_reportable();
917  }
static bool testing::TestCase::TestReportableDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 905 of file gtest.h.

References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().

905  {
906  return test_info->is_reportable() && test_info->is_disabled_;
907  }
static bool testing::TestCase::TestReportableDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 905 of file gtest.h.

References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().

905  {
906  return test_info->is_reportable() && test_info->is_disabled_;
907  }
static bool testing::TestCase::TestReportableDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 905 of file gtest.h.

References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().

905  {
906  return test_info->is_reportable() && test_info->is_disabled_;
907  }
int testing::TestCase::total_test_count ( ) const
int testing::TestCase::total_test_count ( ) const
const char* testing::TestCase::type_param ( ) const
inline

Definition at line 804 of file gtest.h.

804  {
805  if (type_param_.get() != NULL)
806  return type_param_->c_str();
807  return NULL;
808  }
const internal::scoped_ptr< const ::std::string > type_param_
Definition: gtest.h:934
const char* testing::TestCase::type_param ( ) const
inline

Definition at line 804 of file gtest.h.

804  {
805  if (type_param_.get() != NULL)
806  return type_param_->c_str();
807  return NULL;
808  }
const internal::scoped_ptr< const ::std::string > type_param_
Definition: gtest.h:934
void testing::TestCase::UnshuffleTests ( )
private

Definition at line 2798 of file gtest.cc.

References i, and test_indices_.

2798  {
2799  for (size_t i = 0; i < test_indices_.size(); i++) {
2800  test_indices_[i] = static_cast<int>(i);
2801  }
2802 }
std::vector< int > test_indices_
Definition: gtest.h:941
void testing::TestCase::UnshuffleTests ( )
private
void testing::TestCase::UnshuffleTests ( )
private

Friends And Related Function Documentation

Definition at line 853 of file gtest.h.

Test
friend

Definition at line 852 of file gtest.h.

Member Data Documentation

TestResult testing::TestCase::ad_hoc_test_result_
private

Definition at line 952 of file gtest.h.

Referenced by ClearResult(), and testing::internal::UnitTestImpl::RecordProperty().

TimeInMillis testing::TestCase::elapsed_time_
private

Definition at line 949 of file gtest.h.

Referenced by Run().

std::string testing::TestCase::name_
private

Definition at line 931 of file gtest.h.

Test::SetUpTestCaseFunc testing::TestCase::set_up_tc_
private

Definition at line 943 of file gtest.h.

bool testing::TestCase::should_run_
private

Definition at line 947 of file gtest.h.

Referenced by Run().

Test::TearDownTestCaseFunc testing::TestCase::tear_down_tc_
private

Definition at line 945 of file gtest.h.

std::vector< int > testing::TestCase::test_indices_
private

Definition at line 941 of file gtest.h.

Referenced by AddTestInfo(), GetMutableTestInfo(), GetTestInfo(), ShuffleTests(), and UnshuffleTests().

std::vector< TestInfo * > testing::TestCase::test_info_list_
private

Definition at line 937 of file gtest.h.

Referenced by AddTestInfo(), ClearResult(), GetMutableTestInfo(), GetTestInfo(), and ~TestCase().

const internal::scoped_ptr< const ::std::string > testing::TestCase::type_param_
private

Definition at line 934 of file gtest.h.


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