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

#include <gtest-spi.h>

Inheritance diagram for testing::ScopedFakeTestPartResultReporter:
Collaboration diagram for testing::ScopedFakeTestPartResultReporter:

Public Types

enum  InterceptMode { INTERCEPT_ONLY_CURRENT_THREAD , INTERCEPT_ALL_THREADS }
 

Public Member Functions

 ScopedFakeTestPartResultReporter (TestPartResultArray *result)
 
 ScopedFakeTestPartResultReporter (InterceptMode intercept_mode, TestPartResultArray *result)
 
virtual ~ScopedFakeTestPartResultReporter ()
 
virtual void ReportTestPartResult (const TestPartResult &result)
 
- Public Member Functions inherited from testing::TestPartResultReporterInterface
virtual ~TestPartResultReporterInterface ()
 

Detailed Description

Definition at line 51 of file gtest-spi.h.

Member Enumeration Documentation

◆ InterceptMode

Enumerator
INTERCEPT_ONLY_CURRENT_THREAD 
INTERCEPT_ALL_THREADS 

Definition at line 55 of file gtest-spi.h.

55 {
56 INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures.
57 INTERCEPT_ALL_THREADS // Intercepts all failures.
58 };

Constructor & Destructor Documentation

◆ ScopedFakeTestPartResultReporter() [1/2]

testing::ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter ( TestPartResultArray * result)
explicit

Definition at line 580 of file gtest.cc.

582 : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD),
583 result_(result) {
584 Init();
585}
Definition lib.h:54

◆ ScopedFakeTestPartResultReporter() [2/2]

testing::ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter ( InterceptMode intercept_mode,
TestPartResultArray * result )

Definition at line 590 of file gtest.cc.

592 : intercept_mode_(intercept_mode),
593 result_(result) {
594 Init();
595}

◆ ~ScopedFakeTestPartResultReporter()

testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter ( )
virtual

Definition at line 610 of file gtest.cc.

610 {
611 internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
612 if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
613 impl->SetGlobalTestPartResultReporter(old_reporter_);
614 } else {
615 impl->SetTestPartResultReporterForCurrentThread(old_reporter_);
616 }
617}
class UnitTestImpl * GetUnitTestImpl()
Here is the call graph for this function:

Member Function Documentation

◆ ReportTestPartResult()

void testing::ScopedFakeTestPartResultReporter::ReportTestPartResult ( const TestPartResult & result)
virtual

Implements testing::TestPartResultReporterInterface.

Definition at line 621 of file gtest.cc.

622 {
623 result_->Append(result);
624}
void Append(const TestPartResult &result)
Here is the call graph for this function:

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