Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::TestResult Class Reference

#include <gtest.h>

Public Member Functions

 TestResult ()
 
 ~TestResult ()
 
int total_part_count () const
 
int test_property_count () const
 
bool Passed () const
 
bool Failed () const
 
bool HasFatalFailure () const
 
bool HasNonfatalFailure () const
 
TimeInMillis elapsed_time () const
 
const TestPartResultGetTestPartResult (int i) const
 
const TestPropertyGetTestProperty (int i) const
 

Friends

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

Detailed Description

Definition at line 549 of file gtest.h.

Constructor & Destructor Documentation

◆ TestResult()

testing::TestResult::TestResult ( )

Definition at line 2032 of file gtest.cc.

2033 : death_test_count_(0),
2034 elapsed_time_(0) {
2035}

◆ ~TestResult()

testing::TestResult::~TestResult ( )

Definition at line 2038 of file gtest.cc.

2038 {
2039}

Member Function Documentation

◆ elapsed_time()

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

Definition at line 577 of file gtest.h.

577{ return elapsed_time_; }
Here is the caller graph for this function:

◆ Failed()

bool testing::TestResult::Failed ( ) const

Definition at line 2186 of file gtest.cc.

2186 {
2187 for (int i = 0; i < total_part_count(); ++i) {
2188 if (GetTestPartResult(i).failed())
2189 return true;
2190 }
2191 return false;
2192}
int total_part_count() const
Definition gtest.cc:2216
const TestPartResult & GetTestPartResult(int i) const
Definition gtest.cc:2044
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTestPartResult()

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

Definition at line 2044 of file gtest.cc.

2044 {
2045 if (i < 0 || i >= total_part_count())
2047 return test_part_results_.at(i);
2048}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTestProperty()

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

Definition at line 2053 of file gtest.cc.

2053 {
2054 if (i < 0 || i >= test_property_count())
2056 return test_properties_.at(i);
2057}
int test_property_count() const
Definition gtest.cc:2221
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasFatalFailure()

bool testing::TestResult::HasFatalFailure ( ) const

Definition at line 2200 of file gtest.cc.

2200 {
2201 return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
2202}

◆ HasNonfatalFailure()

bool testing::TestResult::HasNonfatalFailure ( ) const

Definition at line 2210 of file gtest.cc.

2210 {
2211 return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0;
2212}

◆ Passed()

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

Definition at line 565 of file gtest.h.

565{ return !Failed(); }
bool Failed() const
Definition gtest.cc:2186
Here is the caller graph for this function:

◆ test_property_count()

int testing::TestResult::test_property_count ( ) const

Definition at line 2221 of file gtest.cc.

2221 {
2222 return static_cast<int>(test_properties_.size());
2223}
Here is the caller graph for this function:

◆ total_part_count()

int testing::TestResult::total_part_count ( ) const

Definition at line 2216 of file gtest.cc.

2216 {
2217 return static_cast<int>(test_part_results_.size());
2218}
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ internal::DefaultGlobalTestPartResultReporter

Definition at line 592 of file gtest.h.

◆ internal::ExecDeathTest

friend class internal::ExecDeathTest
friend

Definition at line 593 of file gtest.h.

◆ internal::FuchsiaDeathTest

friend class internal::FuchsiaDeathTest
friend

Definition at line 597 of file gtest.h.

◆ internal::TestResultAccessor

Definition at line 594 of file gtest.h.

◆ internal::UnitTestImpl

Definition at line 595 of file gtest.h.

◆ internal::WindowsDeathTest

friend class internal::WindowsDeathTest
friend

Definition at line 596 of file gtest.h.

◆ TestCase

friend class TestCase
friend

Definition at line 590 of file gtest.h.

◆ TestInfo

friend class TestInfo
friend

Definition at line 589 of file gtest.h.

◆ UnitTest

friend class UnitTest
friend

Definition at line 591 of file gtest.h.


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