proxygen
|
#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 TestInfo * | GetTestInfo (int i) const |
const TestResult & | ad_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 TestInfo * | GetTestInfo (int i) const |
const TestResult & | ad_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 TestInfo * | GetTestInfo (int i) const |
const TestResult & | ad_hoc_test_result () const |
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::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 |
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.
|
virtual |
Definition at line 2732 of file gtest.cc.
References testing::internal::ForEach(), and test_info_list_.
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 | ( | const char * | name, |
const char * | a_type_param, | ||
Test::SetUpTestCaseFunc | set_up_tc, | ||
Test::TearDownTestCaseFunc | tear_down_tc | ||
) |
|
virtual |
|
inline |
Definition at line 849 of file gtest.h.
Referenced by testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), and testing::internal::PortableLocaltime().
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
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().
|
private |
|
private |
|
inlinestaticprivate |
Definition at line 878 of file gtest.h.
References ClearResult(), and Run().
Referenced by testing::internal::UnitTestImpl::ClearNonAdHocTestResult().
|
inlinestaticprivate |
Definition at line 878 of file gtest.h.
References ClearResult(), and Run().
|
inlinestaticprivate |
Definition at line 878 of file gtest.h.
References ClearResult(), and Run().
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().
|
inline |
|
inline |
|
inline |
Definition at line 841 of file gtest.h.
References i.
Referenced by testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), and testing::internal::TestResultAccessor::test_part_results().
|
inline |
int testing::TestCase::failed_test_count | ( | ) | const |
int testing::TestCase::failed_test_count | ( | ) | const |
int testing::TestCase::failed_test_count | ( | ) | const |
Definition at line 2682 of file gtest.cc.
References testing::internal::CountIf().
Referenced by testing::internal::UnitTestImpl::failed_test_count(), testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), and testing::internal::ShouldRunTestCase().
|
private |
Definition at line 2746 of file gtest.cc.
References testing::internal::GetElementOr(), test_indices_, and test_info_list_.
Referenced by Run().
|
private |
|
private |
const TestInfo* testing::TestCase::GetTestInfo | ( | int | i | ) | const |
const TestInfo* testing::TestCase::GetTestInfo | ( | int | i | ) | const |
const TestInfo * testing::TestCase::GetTestInfo | ( | int | i | ) | const |
Definition at line 2739 of file gtest.cc.
References testing::internal::GetElementOr(), test_indices_, and test_info_list_.
Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::TestInfoTest::GetTestInfo(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), and testing::internal::TEST().
|
private |
|
private |
|
private |
|
inline |
Definition at line 800 of file gtest.h.
References name_.
Referenced by testing::internal::XmlUnitTestResultPrinter::EscapeXmlText(), testing::internal::UnitTestImpl::FilterTests(), testing::internal::UnitTestHelper::FindTestCase(), testing::internal::UnitTestHelper::GetSortedTests(), testing::internal::UnitTestImpl::ListTestsMatchingFilter(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::TestCaseNameIs::operator()(), testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), testing::internal::PrintOnOneLine(), testing::internal::TearDownEnvironment(), testing::internal::TEST(), and testing::internal::TestResultAccessor::test_part_results().
|
inline |
|
inline |
|
inline |
Definition at line 835 of file gtest.h.
Referenced by testing::internal::TestResultAccessor::test_part_results(), and testing::internal::TestCasePassed().
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().
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().
int testing::TestCase::reportable_test_count | ( | ) | const |
|
private |
|
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().
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 868 of file gtest.h.
Referenced by testing::internal::UnitTestImpl::FilterTests(), and testing::internal::TearDownEnvironment().
|
inlineprivate |
|
inlineprivate |
|
inline |
Definition at line 811 of file gtest.h.
Referenced by testing::internal::UnitTestImpl::FilterTests(), testing::internal::UnitTestHelper::GetSortedTests(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), testing::internal::ShouldRunTestCase(), testing::internal::TearDownEnvironment(), testing::internal::TEST(), testing::internal::TestCaseFailed(), and testing::internal::TestCasePassed().
|
inlinestaticprivate |
Definition at line 920 of file gtest.h.
References GTEST_DISALLOW_COPY_AND_ASSIGN_, name_, random(), testing::TestInfo::should_run(), and string.
|
inlinestaticprivate |
Definition at line 920 of file gtest.h.
References GTEST_DISALLOW_COPY_AND_ASSIGN_, name_, random(), testing::TestInfo::should_run(), and string.
|
inlinestaticprivate |
Definition at line 920 of file gtest.h.
References random(), and testing::TestInfo::should_run().
|
private |
|
private |
Definition at line 2793 of file gtest.cc.
References testing::internal::Shuffle(), and test_indices_.
|
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().
|
inlineprivate |
Definition at line 856 of file gtest.h.
Referenced by testing::internal::UnitTestImpl::FilterTests(), testing::Test::HasSameFixtureClass(), testing::internal::UnitTestImpl::ListTestsMatchingFilter(), testing::internal::PrintOnOneLine(), testing::internal::TearDownEnvironment(), and testing::TestPartNonfatallyFailed().
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
int testing::TestCase::test_to_run_count | ( | ) | const |
int testing::TestCase::test_to_run_count | ( | ) | const |
Definition at line 2702 of file gtest.cc.
References testing::internal::CountIf().
Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::ShouldRunTestCase(), testing::internal::TEST(), and testing::internal::UnitTestImpl::test_to_run_count().
int testing::TestCase::test_to_run_count | ( | ) | const |
|
inlinestaticprivate |
Definition at line 910 of file gtest.h.
References testing::TestInfo::is_disabled_.
|
inlinestaticprivate |
Definition at line 910 of file gtest.h.
References testing::TestInfo::is_disabled_.
|
inlinestaticprivate |
Definition at line 910 of file gtest.h.
References testing::TestInfo::is_disabled_.
|
inlinestaticprivate |
Definition at line 899 of file gtest.h.
References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 899 of file gtest.h.
References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 899 of file gtest.h.
References testing::TestResult::Failed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 894 of file gtest.h.
References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 894 of file gtest.h.
References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 894 of file gtest.h.
References testing::TestResult::Passed(), testing::TestInfo::result(), and testing::TestInfo::should_run().
|
inlinestaticprivate |
Definition at line 915 of file gtest.h.
References testing::TestInfo::is_reportable().
|
inlinestaticprivate |
Definition at line 915 of file gtest.h.
References testing::TestInfo::is_reportable().
|
inlinestaticprivate |
Definition at line 915 of file gtest.h.
References testing::TestInfo::is_reportable().
|
inlinestaticprivate |
Definition at line 905 of file gtest.h.
References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().
|
inlinestaticprivate |
Definition at line 905 of file gtest.h.
References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().
|
inlinestaticprivate |
Definition at line 905 of file gtest.h.
References testing::TestInfo::is_disabled_, and testing::TestInfo::is_reportable().
int testing::TestCase::total_test_count | ( | ) | const |
int testing::TestCase::total_test_count | ( | ) | const |
Definition at line 2707 of file gtest.cc.
Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::TestInfoTest::GetTestInfo(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::XmlUnitTestResultPrinter::OutputXmlTestInfo(), testing::internal::PortableLocaltime(), testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(), Run(), testing::internal::ShouldRunTestCase(), testing::internal::TEST(), and testing::internal::UnitTestImpl::total_test_count().
int testing::TestCase::total_test_count | ( | ) | const |
|
inline |
Definition at line 804 of file gtest.h.
Referenced by testing::internal::UnitTestHelper::GetSortedTests(), testing::internal::UnitTestImpl::ListTestsMatchingFilter(), testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(), testing::internal::PrettyUnitTestResultPrinter::OnTestProgramEnd(), testing::internal::PrintFullTestCommentIfPresent(), testing::internal::PrintOnOneLine(), and testing::internal::TEST().
|
inline |
Definition at line 804 of file gtest.h.
|
inline |
Definition at line 804 of file gtest.h.
|
private |
|
private |
|
private |
|
friend |
|
private |
Definition at line 952 of file gtest.h.
Referenced by ClearResult(), and testing::internal::UnitTestImpl::RecordProperty().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 941 of file gtest.h.
Referenced by AddTestInfo(), GetMutableTestInfo(), GetTestInfo(), ShuffleTests(), and UnshuffleTests().
|
private |
Definition at line 937 of file gtest.h.
Referenced by AddTestInfo(), ClearResult(), GetMutableTestInfo(), GetTestInfo(), and ~TestCase().
|
private |