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< inttest_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 19377 of file cares/cares/test/gmock-1.8.0/gtest/gtest.h.

Constructor & Destructor Documentation

◆ TestCase()

TestCase< Proto >::TestCase ( const char *  name,
const char *  a_type_param,
Test::SetUpTestCaseFunc  set_up_tc,
Test::TearDownTestCaseFunc  tear_down_tc 
)

Definition at line 4168 of file gmock-gtest-all.cc.

◆ ~TestCase()

TestCase< Proto >::~TestCase ( )
virtual

Definition at line 4180 of file gmock-gtest-all.cc.

Member Function Documentation

◆ ad_hoc_test_result()

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

◆ AddTestInfo()

void TestCase< Proto >::AddTestInfo ( TestInfo test_info)
private

Definition at line 4201 of file gmock-gtest-all.cc.

◆ ClearResult()

void TestCase< Proto >::ClearResult ( )
private

Definition at line 4235 of file gmock-gtest-all.cc.

◆ ClearTestCaseResult()

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

◆ disabled_test_count()

int TestCase< Proto >::disabled_test_count ( ) const

Definition at line 4140 of file gmock-gtest-all.cc.

◆ elapsed_time()

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

◆ Failed()

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

◆ failed_test_count()

int TestCase< Proto >::failed_test_count ( ) const

Definition at line 4130 of file gmock-gtest-all.cc.

◆ GetMutableTestInfo()

TestInfo * TestCase< Proto >::GetMutableTestInfo ( int  i)
private

Definition at line 4194 of file gmock-gtest-all.cc.

◆ GetTestInfo()

const TestInfo * TestCase< Proto >::GetTestInfo ( int  i) const

Definition at line 4187 of file gmock-gtest-all.cc.

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::TestCase::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestCase  )
private

◆ name()

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

◆ Passed()

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

◆ reportable_disabled_test_count()

int TestCase< Proto >::reportable_disabled_test_count ( ) const

Definition at line 4135 of file gmock-gtest-all.cc.

◆ reportable_test_count()

int TestCase< Proto >::reportable_test_count ( ) const

Definition at line 4145 of file gmock-gtest-all.cc.

◆ Run()

void TestCase< Proto >::Run ( )
private

Definition at line 4207 of file gmock-gtest-all.cc.

◆ RunSetUpTestCase()

void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

◆ RunTearDownTestCase()

void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

◆ set_should_run()

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

◆ should_run()

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

◆ ShouldRunTest()

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

◆ ShuffleTests()

void TestCase< Proto >::ShuffleTests ( internal::Random random)
private

Definition at line 4241 of file gmock-gtest-all.cc.

◆ successful_test_count()

int TestCase< Proto >::successful_test_count ( ) const

Definition at line 4125 of file gmock-gtest-all.cc.

◆ test_info_list() [1/2]

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

◆ test_info_list() [2/2]

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

◆ test_to_run_count()

int TestCase< Proto >::test_to_run_count ( ) const

Definition at line 4150 of file gmock-gtest-all.cc.

◆ TestDisabled()

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

◆ TestFailed()

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

◆ TestPassed()

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

◆ TestReportable()

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

◆ TestReportableDisabled()

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

◆ total_test_count()

int TestCase< Proto >::total_test_count ( ) const

Definition at line 4155 of file gmock-gtest-all.cc.

◆ type_param()

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

◆ UnshuffleTests()

void TestCase< Proto >::UnshuffleTests ( )
private

Definition at line 4246 of file gmock-gtest-all.cc.

Friends And Related Function Documentation

◆ internal::UnitTestImpl

friend class internal::UnitTestImpl
friend

◆ Test

friend class Test
friend

Member Data Documentation

◆ ad_hoc_test_result_

TestResult testing::TestCase::ad_hoc_test_result_
private

◆ elapsed_time_

TimeInMillis testing::TestCase::elapsed_time_
private

◆ name_

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

◆ set_up_tc_

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

◆ should_run_

bool testing::TestCase::should_run_
private

◆ tear_down_tc_

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

◆ test_indices_

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

◆ test_info_list_

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

◆ type_param_

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

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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:45