Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
testing::TestCase Class Reference

#include <gtest.h>

Public Member Functions

const TestResultad_hoc_test_result () const
 
int disabled_test_count () const
 
TimeInMillis elapsed_time () const
 
bool Failed () const
 
int failed_test_count () const
 
const TestInfoGetTestInfo (int i) const
 
const char * name () const
 
bool Passed () const
 
int reportable_disabled_test_count () const
 
int reportable_test_count () const
 
bool should_run () const
 
int successful_test_count () const
 
int test_to_run_count () const
 
 TestCase (const char *name, const char *a_type_param, Test::SetUpTestCaseFunc set_up_tc, Test::TearDownTestCaseFunc tear_down_tc)
 
int total_test_count () const
 
const char * type_param () const
 
virtual ~TestCase ()
 

Private Member Functions

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

Static Private Member Functions

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

Private Attributes

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

Friends

class internal::UnitTestImpl
 
class Test
 

Detailed Description

Definition at line 770 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 2676 of file gtest.cc.

testing::TestCase::~TestCase ( )
virtual

Definition at line 2688 of file gtest.cc.

Member Function Documentation

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

Definition at line 841 of file gtest.h.

void testing::TestCase::AddTestInfo ( TestInfo test_info)
private

Definition at line 2709 of file gtest.cc.

void testing::TestCase::ClearResult ( )
private

Definition at line 2743 of file gtest.cc.

static void testing::TestCase::ClearTestCaseResult ( TestCase test_case)
inlinestaticprivate

Definition at line 870 of file gtest.h.

int testing::TestCase::disabled_test_count ( ) const

Definition at line 2648 of file gtest.cc.

TimeInMillis testing::TestCase::elapsed_time ( ) const
inline

Definition at line 833 of file gtest.h.

bool testing::TestCase::Failed ( ) const
inline

Definition at line 830 of file gtest.h.

int testing::TestCase::failed_test_count ( ) const

Definition at line 2638 of file gtest.cc.

TestInfo * testing::TestCase::GetMutableTestInfo ( int  i)
private

Definition at line 2702 of file gtest.cc.

const TestInfo * testing::TestCase::GetTestInfo ( int  i) const

Definition at line 2695 of file gtest.cc.

testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private
const char* testing::TestCase::name ( ) const
inline

Definition at line 792 of file gtest.h.

bool testing::TestCase::Passed ( ) const
inline

Definition at line 827 of file gtest.h.

int testing::TestCase::reportable_disabled_test_count ( ) const

Definition at line 2643 of file gtest.cc.

int testing::TestCase::reportable_test_count ( ) const

Definition at line 2653 of file gtest.cc.

void testing::TestCase::Run ( )
private

Definition at line 2715 of file gtest.cc.

void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 879 of file gtest.h.

void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 883 of file gtest.h.

void testing::TestCase::set_should_run ( bool  should)
inlineprivate

Definition at line 860 of file gtest.h.

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

Definition at line 803 of file gtest.h.

static bool testing::TestCase::ShouldRunTest ( const TestInfo test_info)
inlinestaticprivate

Definition at line 912 of file gtest.h.

void testing::TestCase::ShuffleTests ( internal::Random random)
private

Definition at line 2749 of file gtest.cc.

int testing::TestCase::successful_test_count ( ) const

Definition at line 2633 of file gtest.cc.

std::vector<TestInfo*>& testing::TestCase::test_info_list ( )
inlineprivate

Definition at line 848 of file gtest.h.

const std::vector<TestInfo*>& testing::TestCase::test_info_list ( ) const
inlineprivate

Definition at line 851 of file gtest.h.

int testing::TestCase::test_to_run_count ( ) const

Definition at line 2658 of file gtest.cc.

static bool testing::TestCase::TestDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 902 of file gtest.h.

static bool testing::TestCase::TestFailed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 891 of file gtest.h.

static bool testing::TestCase::TestPassed ( const TestInfo test_info)
inlinestaticprivate

Definition at line 886 of file gtest.h.

static bool testing::TestCase::TestReportable ( const TestInfo test_info)
inlinestaticprivate

Definition at line 907 of file gtest.h.

static bool testing::TestCase::TestReportableDisabled ( const TestInfo test_info)
inlinestaticprivate

Definition at line 897 of file gtest.h.

int testing::TestCase::total_test_count ( ) const

Definition at line 2663 of file gtest.cc.

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

Definition at line 796 of file gtest.h.

void testing::TestCase::UnshuffleTests ( )
private

Definition at line 2754 of file gtest.cc.

Friends And Related Function Documentation

friend class internal::UnitTestImpl
friend

Definition at line 845 of file gtest.h.

friend class Test
friend

Definition at line 844 of file gtest.h.

Member Data Documentation

TestResult testing::TestCase::ad_hoc_test_result_
private

Definition at line 944 of file gtest.h.

TimeInMillis testing::TestCase::elapsed_time_
private

Definition at line 941 of file gtest.h.

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

Definition at line 923 of file gtest.h.

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

Definition at line 935 of file gtest.h.

bool testing::TestCase::should_run_
private

Definition at line 939 of file gtest.h.

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

Definition at line 937 of file gtest.h.

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

Definition at line 933 of file gtest.h.

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

Definition at line 929 of file gtest.h.

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

Definition at line 926 of file gtest.h.


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


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:18