Sacado Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
testing::UnitTest Class Reference

#include <gtest.h>

Public Member Functions

int Run () GTEST_MUST_USE_RESULT_
 
const char * original_working_dir () const
 
const TestSuitecurrent_test_suite () const GTEST_LOCK_EXCLUDED_(mutex_)
 
const TestCase * current_test_case () const GTEST_LOCK_EXCLUDED_(mutex_)
 
const TestInfocurrent_test_info () const GTEST_LOCK_EXCLUDED_(mutex_)
 
int random_seed () const
 
internal::ParameterizedTestSuiteRegistryparameterized_test_registry () GTEST_LOCK_EXCLUDED_(mutex_)
 
int successful_test_suite_count () const
 
int failed_test_suite_count () const
 
int total_test_suite_count () const
 
int test_suite_to_run_count () const
 
int successful_test_case_count () const
 
int failed_test_case_count () const
 
int total_test_case_count () const
 
int test_case_to_run_count () const
 
int successful_test_count () const
 
int skipped_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 total_test_count () const
 
int test_to_run_count () const
 
TimeInMillis start_timestamp () const
 
TimeInMillis elapsed_time () const
 
bool Passed () const
 
bool Failed () const
 
const TestSuiteGetTestSuite (int i) const
 
const TestCase * GetTestCase (int i) const
 
const TestResultad_hoc_test_result () const
 
TestEventListenerslisteners ()
 

Static Public Member Functions

static UnitTestGetInstance ()
 

Private Member Functions

EnvironmentAddEnvironment (Environment *env)
 
void AddTestPartResult (TestPartResult::Type result_type, const char *file_name, int line_number, const std::string &message, const std::string &os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_)
 
void RecordProperty (const std::string &key, const std::string &value)
 
TestSuiteGetMutableTestSuite (int i)
 
internal::UnitTestImpl * impl ()
 
const internal::UnitTestImpl * impl () const
 
 UnitTest ()
 
virtual ~UnitTest ()
 
void PushGTestTrace (const internal::TraceInfo &trace) GTEST_LOCK_EXCLUDED_(mutex_)
 
void PopGTestTrace () GTEST_LOCK_EXCLUDED_(mutex_)
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (UnitTest)
 

Private Attributes

internal::Mutex mutex_
 
internal::UnitTestImpl * impl_
 

Friends

class ScopedTrace
 
class Test
 
class internal::AssertHelper
 
class internal::StreamingListenerTest
 
class internal::UnitTestRecordPropertyTestHelper
 
EnvironmentAddGlobalTestEnvironment (Environment *env)
 
std::set< std::string > * internal::GetIgnoredParameterizedTestSuites ()
 
internal::UnitTestImpl * internal::GetUnitTestImpl ()
 
void internal::ReportFailureInUnknownLocation (TestPartResult::Type result_type, const std::string &message)
 

Detailed Description

Definition at line 1273 of file gtest.h.

Constructor & Destructor Documentation

◆ UnitTest()

testing::UnitTest::UnitTest ( )
private

Definition at line 5361 of file gtest.cc.

◆ ~UnitTest()

testing::UnitTest::~UnitTest ( )
privatevirtual

Definition at line 5366 of file gtest.cc.

Member Function Documentation

◆ GetInstance()

UnitTest * testing::UnitTest::GetInstance ( )
static

Definition at line 4998 of file gtest.cc.

◆ Run()

int testing::UnitTest::Run ( )

Definition at line 5236 of file gtest.cc.

◆ original_working_dir()

const char * testing::UnitTest::original_working_dir ( ) const

Definition at line 5321 of file gtest.cc.

◆ current_test_suite()

const TestSuite * testing::UnitTest::current_test_suite ( ) const

Definition at line 5327 of file gtest.cc.

◆ current_test_case()

const TestCase * testing::UnitTest::current_test_case ( ) const

Definition at line 5335 of file gtest.cc.

◆ current_test_info()

const TestInfo * testing::UnitTest::current_test_info ( ) const

Definition at line 5344 of file gtest.cc.

◆ random_seed()

int testing::UnitTest::random_seed ( ) const

Definition at line 5351 of file gtest.cc.

◆ parameterized_test_registry()

internal::ParameterizedTestSuiteRegistry & testing::UnitTest::parameterized_test_registry ( )

Definition at line 5356 of file gtest.cc.

◆ successful_test_suite_count()

int testing::UnitTest::successful_test_suite_count ( ) const

Definition at line 5013 of file gtest.cc.

◆ failed_test_suite_count()

int testing::UnitTest::failed_test_suite_count ( ) const

Definition at line 5018 of file gtest.cc.

◆ total_test_suite_count()

int testing::UnitTest::total_test_suite_count ( ) const

Definition at line 5023 of file gtest.cc.

◆ test_suite_to_run_count()

int testing::UnitTest::test_suite_to_run_count ( ) const

Definition at line 5029 of file gtest.cc.

◆ successful_test_case_count()

int testing::UnitTest::successful_test_case_count ( ) const

Definition at line 5035 of file gtest.cc.

◆ failed_test_case_count()

int testing::UnitTest::failed_test_case_count ( ) const

Definition at line 5038 of file gtest.cc.

◆ total_test_case_count()

int testing::UnitTest::total_test_case_count ( ) const

Definition at line 5041 of file gtest.cc.

◆ test_case_to_run_count()

int testing::UnitTest::test_case_to_run_count ( ) const

Definition at line 5044 of file gtest.cc.

◆ successful_test_count()

int testing::UnitTest::successful_test_count ( ) const

Definition at line 5050 of file gtest.cc.

◆ skipped_test_count()

int testing::UnitTest::skipped_test_count ( ) const

Definition at line 5055 of file gtest.cc.

◆ failed_test_count()

int testing::UnitTest::failed_test_count ( ) const

Definition at line 5060 of file gtest.cc.

◆ reportable_disabled_test_count()

int testing::UnitTest::reportable_disabled_test_count ( ) const

Definition at line 5063 of file gtest.cc.

◆ disabled_test_count()

int testing::UnitTest::disabled_test_count ( ) const

Definition at line 5068 of file gtest.cc.

◆ reportable_test_count()

int testing::UnitTest::reportable_test_count ( ) const

Definition at line 5073 of file gtest.cc.

◆ total_test_count()

int testing::UnitTest::total_test_count ( ) const

Definition at line 5078 of file gtest.cc.

◆ test_to_run_count()

int testing::UnitTest::test_to_run_count ( ) const

Definition at line 5081 of file gtest.cc.

◆ start_timestamp()

internal::TimeInMillis testing::UnitTest::start_timestamp ( ) const

Definition at line 5085 of file gtest.cc.

◆ elapsed_time()

internal::TimeInMillis testing::UnitTest::elapsed_time ( ) const

Definition at line 5090 of file gtest.cc.

◆ Passed()

bool testing::UnitTest::Passed ( ) const

Definition at line 5096 of file gtest.cc.

◆ Failed()

bool testing::UnitTest::Failed ( ) const

Definition at line 5100 of file gtest.cc.

◆ GetTestSuite()

const TestSuite * testing::UnitTest::GetTestSuite ( int i) const

Definition at line 5104 of file gtest.cc.

◆ GetTestCase()

const TestCase * testing::UnitTest::GetTestCase ( int i) const

Definition at line 5110 of file gtest.cc.

◆ ad_hoc_test_result()

const TestResult & testing::UnitTest::ad_hoc_test_result ( ) const

Definition at line 5117 of file gtest.cc.

◆ listeners()

TestEventListeners & testing::UnitTest::listeners ( )

Definition at line 5129 of file gtest.cc.

◆ AddEnvironment()

Environment * testing::UnitTest::AddEnvironment ( Environment * env)
private

Definition at line 5143 of file gtest.cc.

◆ AddTestPartResult()

void testing::UnitTest::AddTestPartResult ( TestPartResult::Type result_type,
const char * file_name,
int line_number,
const std::string & message,
const std::string & os_stack_trace )
private

Definition at line 5156 of file gtest.cc.

◆ RecordProperty()

void testing::UnitTest::RecordProperty ( const std::string & key,
const std::string & value )
private

Definition at line 5226 of file gtest.cc.

◆ GetMutableTestSuite()

TestSuite * testing::UnitTest::GetMutableTestSuite ( int i)
private

Definition at line 5123 of file gtest.cc.

◆ impl() [1/2]

internal::UnitTestImpl * testing::UnitTest::impl ( )
inlineprivate

Definition at line 1428 of file gtest.h.

◆ impl() [2/2]

const internal::UnitTestImpl * testing::UnitTest::impl ( ) const
inlineprivate

Definition at line 1429 of file gtest.h.

◆ PushGTestTrace()

void testing::UnitTest::PushGTestTrace ( const internal::TraceInfo & trace)
private

Definition at line 5372 of file gtest.cc.

◆ PopGTestTrace()

void testing::UnitTest::PopGTestTrace ( )
private

Definition at line 5379 of file gtest.cc.

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::UnitTest::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( UnitTest )
private

Friends And Related Symbol Documentation

◆ ScopedTrace

friend class ScopedTrace
friend

Definition at line 1433 of file gtest.h.

◆ Test

friend class Test
friend

Definition at line 1434 of file gtest.h.

◆ internal::AssertHelper

friend class internal::AssertHelper
friend

Definition at line 1435 of file gtest.h.

◆ internal::StreamingListenerTest

friend class internal::StreamingListenerTest
friend

Definition at line 1436 of file gtest.h.

◆ internal::UnitTestRecordPropertyTestHelper

Definition at line 1437 of file gtest.h.

◆ AddGlobalTestEnvironment

Environment * AddGlobalTestEnvironment ( Environment * env)
friend

Definition at line 1492 of file gtest.h.

◆ internal::GetIgnoredParameterizedTestSuites

std::set< std::string > * internal::GetIgnoredParameterizedTestSuites ( )
friend

◆ internal::GetUnitTestImpl

internal::UnitTestImpl * internal::GetUnitTestImpl ( )
friend

◆ internal::ReportFailureInUnknownLocation

void internal::ReportFailureInUnknownLocation ( TestPartResult::Type result_type,
const std::string & message )
friend

Member Data Documentation

◆ mutex_

internal::Mutex testing::UnitTest::mutex_
mutableprivate

Definition at line 1462 of file gtest.h.

◆ impl_

internal::UnitTestImpl* testing::UnitTest::impl_
private

Definition at line 1468 of file gtest.h.


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