Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skiatest::Reporter Class Referenceabstract

#include <Test.h>

Inheritance diagram for skiatest::Reporter:
SkNoncopyable BazelReporter DMReporter WasmReporter

Public Member Functions

virtual ~Reporter ()
 
virtual void bumpTestCount ()
 
virtual void reportFailed (const skiatest::Failure &)=0
 
virtual bool allowExtendedTest () const
 
virtual bool verbose () const
 
virtual void * stats () const
 
void reportFailedWithContext (const skiatest::Failure &)
 
void push (const SkString &message)
 
void push (const std::string &message)
 
void pop ()
 

Detailed Description

Definition at line 58 of file Test.h.

Constructor & Destructor Documentation

◆ ~Reporter()

virtual skiatest::Reporter::~Reporter ( )
inlinevirtual

Definition at line 60 of file Test.h.

60{}

Member Function Documentation

◆ allowExtendedTest()

bool skiatest::Reporter::allowExtendedTest ( ) const
virtual

Reimplemented in DMReporter, and BazelReporter.

Definition at line 21 of file Test.cpp.

21{ return false; }

◆ bumpTestCount()

void skiatest::Reporter::bumpTestCount ( )
virtual

Definition at line 19 of file Test.cpp.

19{}

◆ pop()

void skiatest::Reporter::pop ( )
inline

Remove additional context from failure assertions.

Definition at line 82 of file Test.h.

82 {
83 fContextStack.pop_back();
84 }

◆ push() [1/2]

void skiatest::Reporter::push ( const SkString message)
inline

Show additional context (e.g. subtest name) on failure assertions.

Definition at line 72 of file Test.h.

72 {
73 fContextStack.push_back(message);
74 }
Win32Message message

◆ push() [2/2]

void skiatest::Reporter::push ( const std::string &  message)
inline

Definition at line 75 of file Test.h.

75 {
76 fContextStack.push_back(SkString(message));
77 }

◆ reportFailed()

virtual void skiatest::Reporter::reportFailed ( const skiatest::Failure )
pure virtual

Implemented in DMReporter, WasmReporter, and BazelReporter.

◆ reportFailedWithContext()

void skiatest::Reporter::reportFailedWithContext ( const skiatest::Failure f)

Definition at line 26 of file Test.cpp.

26 {
27 SkString fullMessage = f.message;
28 if (!fContextStack.empty()) {
29 fullMessage.append(" [");
30 for (int i = 0; i < fContextStack.size(); ++i) {
31 if (i > 0) {
32 fullMessage.append(", ");
33 }
34 fullMessage.append(fContextStack[i]);
35 }
36 fullMessage.append("]");
37 }
38 this->reportFailed(skiatest::Failure(f.fileName, f.lineNo, f.condition, fullMessage));
39}
void append(const char text[])
Definition SkString.h:203
bool empty() const
Definition SkTArray.h:194
int size() const
Definition SkTArray.h:416
virtual void reportFailed(const skiatest::Failure &)=0

◆ stats()

virtual void * skiatest::Reporter::stats ( ) const
inlinevirtual

Definition at line 65 of file Test.h.

65{ return nullptr; }

◆ verbose()

bool skiatest::Reporter::verbose ( ) const
virtual

Reimplemented in DMReporter, and BazelReporter.

Definition at line 23 of file Test.cpp.

23{ return false; }

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