Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
testing::TestResult Class Reference

#include <gtest.h>

Public Member Functions

TimeInMillis elapsed_time () const
 
bool Failed () const
 
const TestPartResult & GetTestPartResult (int i) const
 
const TestPropertyGetTestProperty (int i) const
 
bool HasFatalFailure () const
 
bool HasNonfatalFailure () const
 
bool Passed () const
 
bool Skipped () const
 
int test_property_count () const
 
 TestResult ()
 
int total_part_count () const
 
 ~TestResult ()
 

Private Member Functions

void AddTestPartResult (const TestPartResult &test_part_result)
 
void Clear ()
 
void ClearTestPartResults ()
 
int death_test_count () const
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestResult)
 
int increment_death_test_count ()
 
void RecordProperty (const std::string &xml_element, const TestProperty &test_property)
 
void set_elapsed_time (TimeInMillis elapsed)
 
const std::vector< TestPartResult > & test_part_results () const
 
const std::vector< TestProperty > & test_properties () const
 

Static Private Member Functions

static bool ValidateTestProperty (const std::string &xml_element, const TestProperty &test_property)
 

Private Attributes

int death_test_count_
 
TimeInMillis elapsed_time_
 
std::vector< TestPartResult > test_part_results_
 
internal::Mutex test_properites_mutex_
 
std::vector< TestPropertytest_properties_
 

Friends

class internal::DefaultGlobalTestPartResultReporter
 
class internal::ExecDeathTest
 
class internal::FuchsiaDeathTest
 
class internal::TestResultAccessor
 
class internal::UnitTestImpl
 
class internal::WindowsDeathTest
 
class TestInfo
 
class TestSuite
 
class UnitTest
 

Detailed Description

Definition at line 571 of file gtest.h.

Constructor & Destructor Documentation

◆ TestResult()

testing::TestResult::TestResult ( )

Definition at line 2033 of file gtest.cc.

◆ ~TestResult()

testing::TestResult::~TestResult ( )

Definition at line 2039 of file gtest.cc.

Member Function Documentation

◆ AddTestPartResult()

void testing::TestResult::AddTestPartResult ( const TestPartResult &  test_part_result)
private

Definition at line 2066 of file gtest.cc.

◆ Clear()

void testing::TestResult::Clear ( )
private

Definition at line 2174 of file gtest.cc.

◆ ClearTestPartResults()

void testing::TestResult::ClearTestPartResults ( )
private

Definition at line 2061 of file gtest.cc.

◆ death_test_count()

int testing::TestResult::death_test_count ( ) const
inlineprivate

Definition at line 656 of file gtest.h.

◆ elapsed_time()

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

Definition at line 602 of file gtest.h.

◆ Failed()

bool testing::TestResult::Failed ( ) const

Definition at line 2192 of file gtest.cc.

◆ GetTestPartResult()

const TestPartResult & testing::TestResult::GetTestPartResult ( int  i) const

Definition at line 2045 of file gtest.cc.

◆ GetTestProperty()

const TestProperty & testing::TestResult::GetTestProperty ( int  i) const

Definition at line 2054 of file gtest.cc.

◆ GTEST_DISALLOW_COPY_AND_ASSIGN_()

testing::TestResult::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestResult  )
private

◆ HasFatalFailure()

bool testing::TestResult::HasFatalFailure ( ) const

Definition at line 2206 of file gtest.cc.

◆ HasNonfatalFailure()

bool testing::TestResult::HasNonfatalFailure ( ) const

Definition at line 2216 of file gtest.cc.

◆ increment_death_test_count()

int testing::TestResult::increment_death_test_count ( )
inlineprivate

Definition at line 659 of file gtest.h.

◆ Passed()

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

Definition at line 587 of file gtest.h.

◆ RecordProperty()

void testing::TestResult::RecordProperty ( const std::string xml_element,
const TestProperty test_property 
)
private

Definition at line 2073 of file gtest.cc.

◆ set_elapsed_time()

void testing::TestResult::set_elapsed_time ( TimeInMillis  elapsed)
inlineprivate

Definition at line 635 of file gtest.h.

◆ Skipped()

bool testing::TestResult::Skipped ( ) const

Definition at line 2187 of file gtest.cc.

◆ test_part_results()

const std::vector<TestPartResult>& testing::TestResult::test_part_results ( ) const
inlineprivate

Definition at line 625 of file gtest.h.

◆ test_properties()

const std::vector<TestProperty>& testing::TestResult::test_properties ( ) const
inlineprivate

Definition at line 630 of file gtest.h.

◆ test_property_count()

int testing::TestResult::test_property_count ( ) const

Definition at line 2227 of file gtest.cc.

◆ total_part_count()

int testing::TestResult::total_part_count ( ) const

Definition at line 2222 of file gtest.cc.

◆ ValidateTestProperty()

bool testing::TestResult::ValidateTestProperty ( const std::string xml_element,
const TestProperty test_property 
)
staticprivate

Definition at line 2167 of file gtest.cc.

Friends And Related Function Documentation

◆ internal::DefaultGlobalTestPartResultReporter

friend class internal::DefaultGlobalTestPartResultReporter
friend

Definition at line 617 of file gtest.h.

◆ internal::ExecDeathTest

friend class internal::ExecDeathTest
friend

Definition at line 618 of file gtest.h.

◆ internal::FuchsiaDeathTest

friend class internal::FuchsiaDeathTest
friend

Definition at line 622 of file gtest.h.

◆ internal::TestResultAccessor

friend class internal::TestResultAccessor
friend

Definition at line 619 of file gtest.h.

◆ internal::UnitTestImpl

friend class internal::UnitTestImpl
friend

Definition at line 620 of file gtest.h.

◆ internal::WindowsDeathTest

friend class internal::WindowsDeathTest
friend

Definition at line 621 of file gtest.h.

◆ TestInfo

friend class TestInfo
friend

Definition at line 614 of file gtest.h.

◆ TestSuite

friend class TestSuite
friend

Definition at line 615 of file gtest.h.

◆ UnitTest

friend class UnitTest
friend

Definition at line 616 of file gtest.h.

Member Data Documentation

◆ death_test_count_

int testing::TestResult::death_test_count_
private

Definition at line 676 of file gtest.h.

◆ elapsed_time_

TimeInMillis testing::TestResult::elapsed_time_
private

Definition at line 678 of file gtest.h.

◆ test_part_results_

std::vector<TestPartResult> testing::TestResult::test_part_results_
private

Definition at line 672 of file gtest.h.

◆ test_properites_mutex_

internal::Mutex testing::TestResult::test_properites_mutex_
private

Definition at line 669 of file gtest.h.

◆ test_properties_

std::vector<TestProperty> testing::TestResult::test_properties_
private

Definition at line 674 of file gtest.h.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:11