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

#include <gtest-test-part.h>

Public Types

enum  Type { kSuccess , kNonFatalFailure , kFatalFailure }
 

Public Member Functions

 TestPartResult (Type a_type, const char *a_file_name, int a_line_number, const char *a_message)
 
Type type () const
 
const char * file_name () const
 
int line_number () const
 
const char * summary () const
 
const char * message () const
 
bool passed () const
 
bool failed () const
 
bool nonfatally_failed () const
 
bool fatally_failed () const
 

Detailed Description

Definition at line 47 of file gtest-test-part.h.

Member Enumeration Documentation

◆ Type

Enumerator
kSuccess 
kNonFatalFailure 
kFatalFailure 

Definition at line 51 of file gtest-test-part.h.

51 {
52 kSuccess, // Succeeded.
53 kNonFatalFailure, // Failed but the test can continue.
54 kFatalFailure // Failed and the test should be terminated.
55 };

Constructor & Destructor Documentation

◆ TestPartResult()

testing::TestPartResult::TestPartResult ( Type a_type,
const char * a_file_name,
int a_line_number,
const char * a_message )
inline

Definition at line 60 of file gtest-test-part.h.

64 : type_(a_type),
65 file_name_(a_file_name == NULL ? "" : a_file_name),
66 line_number_(a_line_number),
67 summary_(ExtractSummary(a_message)),
68 message_(a_message) {
69 }

Member Function Documentation

◆ failed()

bool testing::TestPartResult::failed ( ) const
inline

Definition at line 94 of file gtest-test-part.h.

94{ return type_ != kSuccess; }

◆ fatally_failed()

bool testing::TestPartResult::fatally_failed ( ) const
inline

Definition at line 100 of file gtest-test-part.h.

100{ return type_ == kFatalFailure; }

◆ file_name()

const char * testing::TestPartResult::file_name ( ) const
inline

Definition at line 76 of file gtest-test-part.h.

76 {
77 return file_name_.empty() ? NULL : file_name_.c_str();
78 }

◆ line_number()

int testing::TestPartResult::line_number ( ) const
inline

Definition at line 82 of file gtest-test-part.h.

82{ return line_number_; }

◆ message()

const char * testing::TestPartResult::message ( ) const
inline

Definition at line 88 of file gtest-test-part.h.

88{ return message_.c_str(); }

◆ nonfatally_failed()

bool testing::TestPartResult::nonfatally_failed ( ) const
inline

Definition at line 97 of file gtest-test-part.h.

97{ return type_ == kNonFatalFailure; }

◆ passed()

bool testing::TestPartResult::passed ( ) const
inline

Definition at line 91 of file gtest-test-part.h.

91{ return type_ == kSuccess; }

◆ summary()

const char * testing::TestPartResult::summary ( ) const
inline

Definition at line 85 of file gtest-test-part.h.

85{ return summary_.c_str(); }

◆ type()

Type testing::TestPartResult::type ( ) const
inline

Definition at line 72 of file gtest-test-part.h.

72{ return type_; }

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