Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
skiatest::Failure Struct Reference

#include <Test.h>

Public Member Functions

 Failure (const char *f, int l, const char *c, const SkString &m)
 
SkString toString () const
 

Public Attributes

const char * fileName
 
int lineNo
 
const char * condition
 
SkString message
 

Detailed Description

Definition at line 48 of file Test.h.

Constructor & Destructor Documentation

◆ Failure()

skiatest::Failure::Failure ( const char *  f,
int  l,
const char *  c,
const SkString m 
)
inline

Definition at line 49 of file Test.h.

50 : fileName(f), lineNo(l), condition(c), message(m) {}
const char * condition
Definition: Test.h:53
SkString message
Definition: Test.h:54
const char * fileName
Definition: Test.h:51

Member Function Documentation

◆ toString()

SkString skiatest::Failure::toString ( ) const

Definition at line 41 of file Test.cpp.

41 {
42 SkString result = SkStringPrintf("%s:%d\t", this->fileName, this->lineNo);
43 if (!this->message.isEmpty()) {
44 result.append(this->message);
45 if (strlen(this->condition) > 0) {
46 result.append(": ");
47 }
48 }
49 result.append(this->condition);
50 return result;
51}
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
bool isEmpty() const
Definition: SkString.h:130
void append(const char text[])
Definition: SkString.h:203
GAsyncResult * result

Member Data Documentation

◆ condition

const char* skiatest::Failure::condition

Definition at line 53 of file Test.h.

◆ fileName

const char* skiatest::Failure::fileName

Definition at line 51 of file Test.h.

◆ lineNo

int skiatest::Failure::lineNo

Definition at line 52 of file Test.h.

◆ message

SkString skiatest::Failure::message

Definition at line 54 of file Test.h.


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