Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testing::TestCase Class Reference

#include <JETSCAPE/blob/main/external_packages/googletest/googletest/include/gtest/gtest.h>

+ Collaboration diagram for testing::TestCase:

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
 

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)
 

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)
 

Private Attributes

std::string name_
 
const internal::scoped_ptr
< const ::std::string > 
type_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.

View newest version in sPHENIX GitHub at line 778 of file gtest.h

Constructor & Destructor Documentation

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.

View newest version in sPHENIX GitHub at line 2720 of file gtest.cc

TestCase::~TestCase ( )
virtual

Definition at line 2732 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2732 of file gtest.cc

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

+ Here is the call graph for this function:

Member Function Documentation

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

Definition at line 849 of file gtest.h.

View newest version in sPHENIX GitHub at line 849 of file gtest.h

Referenced by testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase().

+ Here is the caller graph for this function:

void TestCase::AddTestInfo ( TestInfo test_info)
private

Definition at line 2753 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2753 of file gtest.cc

References test_indices_, and test_info_list_.

void TestCase::ClearResult ( )
private

Definition at line 2787 of file gtest.cc.

View newest version in sPHENIX GitHub 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 878 of file gtest.h.

View newest version in sPHENIX GitHub at line 878 of file gtest.h

References ClearResult().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TestCase::disabled_test_count ( ) const

Definition at line 2692 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2692 of file gtest.cc

References testing::internal::CountIf(), test_info_list_, and TestDisabled().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 841 of file gtest.h.

View newest version in sPHENIX GitHub at line 841 of file gtest.h

Referenced by testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(), and testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase().

+ Here is the caller graph for this function:

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

Definition at line 838 of file gtest.h.

View newest version in sPHENIX GitHub at line 838 of file gtest.h

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

+ Here is the caller graph for this function:

int TestCase::failed_test_count ( ) const

Definition at line 2682 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2682 of file gtest.cc

References testing::internal::CountIf(), test_info_list_, and TestFailed().

Referenced by testing::internal::UnitTestImpl::failed_test_count(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), and testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TestInfo * TestCase::GetMutableTestInfo ( int  i)
private

Definition at line 2746 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2746 of file gtest.cc

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

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2739 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2739 of file gtest.cc

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

Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::TestInfoTest::GetTestInfo(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase(), and testing::internal::TEST().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 835 of file gtest.h.

View newest version in sPHENIX GitHub at line 835 of file gtest.h

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

+ Here is the caller graph for this function:

int TestCase::reportable_disabled_test_count ( ) const

Definition at line 2687 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2687 of file gtest.cc

References testing::internal::CountIf(), test_info_list_, and TestReportableDisabled().

Referenced by testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase(), and testing::internal::UnitTestImpl::reportable_disabled_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TestCase::reportable_test_count ( ) const

Definition at line 2697 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2697 of file gtest.cc

References testing::internal::CountIf(), test_info_list_, and TestReportable().

Referenced by testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase(), testing::internal::XmlUnitTestResultPrinter::PrintXmlUnitTest(), and testing::internal::UnitTestImpl::reportable_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TestCase::Run ( )
private
void testing::TestCase::RunSetUpTestCase ( )
inlineprivate

Definition at line 887 of file gtest.h.

View newest version in sPHENIX GitHub at line 887 of file gtest.h

Referenced by Run().

+ Here is the caller graph for this function:

void testing::TestCase::RunTearDownTestCase ( )
inlineprivate

Definition at line 891 of file gtest.h.

View newest version in sPHENIX GitHub at line 891 of file gtest.h

Referenced by Run().

+ Here is the caller graph for this function:

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

Definition at line 868 of file gtest.h.

View newest version in sPHENIX GitHub at line 868 of file gtest.h

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

+ Here is the caller graph for this function:

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

Definition at line 811 of file gtest.h.

View newest version in sPHENIX GitHub at line 811 of file gtest.h

Referenced by testing::internal::UnitTestImpl::FilterTests(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), testing::internal::ShouldRunTestCase(), testing::internal::TEST(), testing::internal::TestCaseFailed(), and testing::internal::TestCasePassed().

+ Here is the caller graph for this function:

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

Definition at line 920 of file gtest.h.

View newest version in sPHENIX GitHub at line 920 of file gtest.h

References testing::TestInfo::should_run().

Referenced by test_to_run_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2793 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2793 of file gtest.cc

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

+ Here is the call graph for this function:

int TestCase::successful_test_count ( ) const

Definition at line 2677 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2677 of file gtest.cc

References testing::internal::CountIf(), test_info_list_, and TestPassed().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 856 of file gtest.h.

View newest version in sPHENIX GitHub at line 856 of file gtest.h

Referenced by testing::internal::UnitTestImpl::FilterTests(), testing::Test::HasSameFixtureClass(), and testing::internal::UnitTestImpl::ListTestsMatchingFilter().

+ Here is the caller graph for this function:

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

Definition at line 859 of file gtest.h.

View newest version in sPHENIX GitHub at line 859 of file gtest.h

int TestCase::test_to_run_count ( ) const

Definition at line 2702 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2702 of file gtest.cc

References testing::internal::CountIf(), ShouldRunTest(), and test_info_list_.

Referenced by testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(), testing::internal::TEST(), and testing::internal::UnitTestImpl::test_to_run_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 910 of file gtest.h.

View newest version in sPHENIX GitHub at line 910 of file gtest.h

References testing::TestInfo::is_disabled_.

Referenced by disabled_test_count().

+ Here is the caller graph for this function:

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

Definition at line 899 of file gtest.h.

View newest version in sPHENIX GitHub at line 899 of file gtest.h

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

Referenced by failed_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 894 of file gtest.h.

View newest version in sPHENIX GitHub at line 894 of file gtest.h

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

Referenced by successful_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 915 of file gtest.h.

View newest version in sPHENIX GitHub at line 915 of file gtest.h

References testing::TestInfo::is_reportable().

Referenced by reportable_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 905 of file gtest.h.

View newest version in sPHENIX GitHub at line 905 of file gtest.h

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

Referenced by reportable_disabled_test_count().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TestCase::total_test_count ( ) const

Definition at line 2707 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2707 of file gtest.cc

References test_info_list_.

Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::TestInfoTest::GetTestInfo(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), testing::internal::XmlUnitTestResultPrinter::PrintXmlTestCase(), Run(), testing::internal::TEST(), and testing::internal::UnitTestImpl::total_test_count().

+ Here is the caller graph for this function:

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

Definition at line 804 of file gtest.h.

View newest version in sPHENIX GitHub at line 804 of file gtest.h

Referenced by testing::internal::UnitTestImpl::ListTestsMatchingFilter(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(), and testing::internal::TEST().

+ Here is the caller graph for this function:

void TestCase::UnshuffleTests ( )
private

Definition at line 2798 of file gtest.cc.

View newest version in sPHENIX GitHub at line 2798 of file gtest.cc

References i, and test_indices_.

Friends And Related Function Documentation

friend class internal::UnitTestImpl
friend

Definition at line 853 of file gtest.h.

View newest version in sPHENIX GitHub at line 853 of file gtest.h

friend class Test
friend

Definition at line 852 of file gtest.h.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 949 of file gtest.h

Referenced by Run().

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

Definition at line 931 of file gtest.h.

View newest version in sPHENIX GitHub at line 931 of file gtest.h

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

Definition at line 943 of file gtest.h.

View newest version in sPHENIX GitHub at line 943 of file gtest.h

bool testing::TestCase::should_run_
private

Definition at line 947 of file gtest.h.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 945 of file gtest.h

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

Definition at line 941 of file gtest.h.

View newest version in sPHENIX GitHub at line 941 of file gtest.h

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

std::vector<TestInfo*> testing::TestCase::test_info_list_
private
const internal::scoped_ptr<const ::std::string> testing::TestCase::type_param_
private

Definition at line 934 of file gtest.h.

View newest version in sPHENIX GitHub at line 934 of file gtest.h


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