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 746 of file gtest.h.

Constructor & Destructor Documentation

◆ TestCase()

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

Definition at line 2393 of file gtest.cc.

◆ ~TestCase()

testing::TestCase::~TestCase ( )
virtual

Definition at line 2405 of file gtest.cc.

Member Function Documentation

◆ ad_hoc_test_result()

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

Definition at line 817 of file gtest.h.

◆ AddTestInfo()

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

Definition at line 2426 of file gtest.cc.

◆ ClearResult()

void testing::TestCase::ClearResult ( )
private

Definition at line 2460 of file gtest.cc.

◆ ClearTestCaseResult()

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

Definition at line 846 of file gtest.h.

◆ disabled_test_count()

int testing::TestCase::disabled_test_count ( ) const

Definition at line 2365 of file gtest.cc.

◆ elapsed_time()

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

Definition at line 809 of file gtest.h.

◆ Failed()

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

Definition at line 806 of file gtest.h.

◆ failed_test_count()

int testing::TestCase::failed_test_count ( ) const

Definition at line 2355 of file gtest.cc.

◆ GetMutableTestInfo()

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

Definition at line 2419 of file gtest.cc.

◆ GetTestInfo()

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

Definition at line 2412 of file gtest.cc.

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private

◆ name()

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

Definition at line 768 of file gtest.h.

◆ Passed()

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

Definition at line 803 of file gtest.h.

◆ reportable_disabled_test_count()

int testing::TestCase::reportable_disabled_test_count ( ) const

Definition at line 2360 of file gtest.cc.

◆ reportable_test_count()

int testing::TestCase::reportable_test_count ( ) const

Definition at line 2370 of file gtest.cc.

◆ Run()

void testing::TestCase::Run ( )
private

Definition at line 2432 of file gtest.cc.

◆ RunSetUpTestCase()

void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 855 of file gtest.h.

◆ RunTearDownTestCase()

void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 859 of file gtest.h.

◆ set_should_run()

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

Definition at line 836 of file gtest.h.

◆ should_run()

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

Definition at line 779 of file gtest.h.

◆ ShouldRunTest()

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

Definition at line 888 of file gtest.h.

◆ ShuffleTests()

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

Definition at line 2466 of file gtest.cc.

◆ successful_test_count()

int testing::TestCase::successful_test_count ( ) const

Definition at line 2350 of file gtest.cc.

◆ test_info_list() [1/2]

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

Definition at line 824 of file gtest.h.

◆ test_info_list() [2/2]

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

Definition at line 827 of file gtest.h.

◆ test_to_run_count()

int testing::TestCase::test_to_run_count ( ) const

Definition at line 2375 of file gtest.cc.

◆ TestDisabled()

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

Definition at line 878 of file gtest.h.

◆ TestFailed()

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

Definition at line 867 of file gtest.h.

◆ TestPassed()

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

Definition at line 862 of file gtest.h.

◆ TestReportable()

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

Definition at line 883 of file gtest.h.

◆ TestReportableDisabled()

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

Definition at line 873 of file gtest.h.

◆ total_test_count()

int testing::TestCase::total_test_count ( ) const

Definition at line 2380 of file gtest.cc.

◆ type_param()

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

Definition at line 772 of file gtest.h.

◆ UnshuffleTests()

void testing::TestCase::UnshuffleTests ( )
private

Definition at line 2471 of file gtest.cc.

Friends And Related Function Documentation

◆ internal::UnitTestImpl

friend class internal::UnitTestImpl
friend

Definition at line 821 of file gtest.h.

◆ Test

friend class Test
friend

Definition at line 820 of file gtest.h.

Member Data Documentation

◆ ad_hoc_test_result_

TestResult testing::TestCase::ad_hoc_test_result_
private

Definition at line 920 of file gtest.h.

◆ elapsed_time_

TimeInMillis testing::TestCase::elapsed_time_
private

Definition at line 917 of file gtest.h.

◆ name_

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

Definition at line 899 of file gtest.h.

◆ set_up_tc_

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

Definition at line 911 of file gtest.h.

◆ should_run_

bool testing::TestCase::should_run_
private

Definition at line 915 of file gtest.h.

◆ tear_down_tc_

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

Definition at line 913 of file gtest.h.

◆ test_indices_

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

Definition at line 909 of file gtest.h.

◆ test_info_list_

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

Definition at line 905 of file gtest.h.

◆ type_param_

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

Definition at line 902 of file gtest.h.


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


fcl
Author(s):
autogenerated on Wed Feb 17 2021 03:40:11