Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 TestCasecurrent_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 TestCaseGetTestCase (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)
 
void UponLeavingGTest ()
 
void set_current_test_suite (TestSuite *a_current_test_suite) GTEST_LOCK_EXCLUDED_(mutex_)
 
void set_current_test_info (TestInfo *a_current_test_info) GTEST_LOCK_EXCLUDED_(mutex_)
 
internal::UnitTestImplimpl ()
 
const internal::UnitTestImplimpl () const
 
 UnitTest ()
 
virtual ~UnitTest ()
 
void PushGTestTrace (const internal::TraceInfo &trace) GTEST_LOCK_EXCLUDED_(mutex_)
 
void PopGTestTrace () GTEST_LOCK_EXCLUDED_(mutex_)
 
 UnitTest (const UnitTest &)=delete
 
UnitTestoperator= (const UnitTest &)=delete
 

Private Attributes

internal::Mutex mutex_
 
internal::UnitTestImplimpl_
 

Friends

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

Detailed Description

Definition at line 1113 of file gtest.h.

Constructor & Destructor Documentation

testing::UnitTest::UnitTest ( )
private

Definition at line 5634 of file gtest.cc.

testing::UnitTest::~UnitTest ( )
privatevirtual

Definition at line 5637 of file gtest.cc.

testing::UnitTest::UnitTest ( const UnitTest )
privatedelete

Member Function Documentation

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

Definition at line 5239 of file gtest.cc.

int testing::UnitTest::Run ( )

Definition at line 5498 of file gtest.cc.

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

Definition at line 5600 of file gtest.cc.

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

Definition at line 5608 of file gtest.cc.

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

Definition at line 5617 of file gtest.cc.

int testing::UnitTest::random_seed ( ) const

Definition at line 5624 of file gtest.cc.

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

Definition at line 5629 of file gtest.cc.

int testing::UnitTest::successful_test_suite_count ( ) const

Definition at line 5254 of file gtest.cc.

int testing::UnitTest::failed_test_suite_count ( ) const

Definition at line 5259 of file gtest.cc.

int testing::UnitTest::total_test_suite_count ( ) const

Definition at line 5264 of file gtest.cc.

int testing::UnitTest::test_suite_to_run_count ( ) const

Definition at line 5270 of file gtest.cc.

int testing::UnitTest::successful_test_case_count ( ) const

Definition at line 5276 of file gtest.cc.

int testing::UnitTest::failed_test_case_count ( ) const

Definition at line 5279 of file gtest.cc.

int testing::UnitTest::total_test_case_count ( ) const

Definition at line 5282 of file gtest.cc.

int testing::UnitTest::test_case_to_run_count ( ) const

Definition at line 5285 of file gtest.cc.

int testing::UnitTest::successful_test_count ( ) const

Definition at line 5291 of file gtest.cc.

int testing::UnitTest::skipped_test_count ( ) const

Definition at line 5296 of file gtest.cc.

int testing::UnitTest::failed_test_count ( ) const

Definition at line 5301 of file gtest.cc.

int testing::UnitTest::reportable_disabled_test_count ( ) const

Definition at line 5304 of file gtest.cc.

int testing::UnitTest::disabled_test_count ( ) const

Definition at line 5309 of file gtest.cc.

int testing::UnitTest::reportable_test_count ( ) const

Definition at line 5314 of file gtest.cc.

int testing::UnitTest::total_test_count ( ) const

Definition at line 5319 of file gtest.cc.

int testing::UnitTest::test_to_run_count ( ) const

Definition at line 5322 of file gtest.cc.

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

Definition at line 5326 of file gtest.cc.

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

Definition at line 5331 of file gtest.cc.

bool testing::UnitTest::Passed ( ) const

Definition at line 5337 of file gtest.cc.

bool testing::UnitTest::Failed ( ) const

Definition at line 5341 of file gtest.cc.

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

Definition at line 5345 of file gtest.cc.

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

Definition at line 5351 of file gtest.cc.

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

Definition at line 5358 of file gtest.cc.

TestEventListeners & testing::UnitTest::listeners ( )

Definition at line 5386 of file gtest.cc.

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

Definition at line 5398 of file gtest.cc.

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 5411 of file gtest.cc.

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

Definition at line 5488 of file gtest.cc.

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

Definition at line 5364 of file gtest.cc.

void testing::UnitTest::UponLeavingGTest ( )
private

Definition at line 5368 of file gtest.cc.

void testing::UnitTest::set_current_test_suite ( TestSuite a_current_test_suite)
private

Definition at line 5373 of file gtest.cc.

void testing::UnitTest::set_current_test_info ( TestInfo a_current_test_info)
private

Definition at line 5379 of file gtest.cc.

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

Definition at line 1280 of file gtest.h.

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

Definition at line 1281 of file gtest.h.

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

Definition at line 5641 of file gtest.cc.

void testing::UnitTest::PopGTestTrace ( )
private

Definition at line 5648 of file gtest.cc.

UnitTest& testing::UnitTest::operator= ( const UnitTest )
privatedelete

Friends And Related Function Documentation

friend class ScopedTrace
friend

Definition at line 1285 of file gtest.h.

friend class Test
friend

Definition at line 1286 of file gtest.h.

friend class TestInfo
friend

Definition at line 1287 of file gtest.h.

friend class TestSuite
friend

Definition at line 1288 of file gtest.h.

friend class internal::AssertHelper
friend

Definition at line 1289 of file gtest.h.

friend class internal::StreamingListenerTest
friend

Definition at line 1290 of file gtest.h.

Definition at line 1291 of file gtest.h.

Environment* AddGlobalTestEnvironment ( Environment env)
friend

Definition at line 1345 of file gtest.h.

std::set<std::string>* internal::GetIgnoredParameterizedTestSuites ( )
friend
void internal::ReportFailureInUnknownLocation ( TestPartResult::Type  result_type,
const std::string &  message 
)
friend

Member Data Documentation

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

Definition at line 1314 of file gtest.h.

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

Definition at line 1320 of file gtest.h.


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