Electroneum
testing::TestPartResult Class Reference

#include <gtest-test-part.h>

Public Types

enum  Type {
  kSuccess, kNonFatalFailure, kFatalFailure, kSuccess,
  kNonFatalFailure, kFatalFailure
}
 
enum  Type {
  kSuccess, kNonFatalFailure, kFatalFailure, 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
 
 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 [1/2]

Enumerator
kSuccess 
kNonFatalFailure 
kFatalFailure 
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  };

◆ Type [2/2]

Enumerator
kSuccess 
kNonFatalFailure 
kFatalFailure 
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() [1/2]

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  }

◆ TestPartResult() [2/2]

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() [1/2]

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

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

◆ failed() [2/2]

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

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

◆ fatally_failed() [1/2]

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

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

◆ fatally_failed() [2/2]

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

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

◆ file_name() [1/2]

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  }

◆ file_name() [2/2]

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() [1/2]

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

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

82 { return line_number_; }

◆ line_number() [2/2]

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

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

82 { return line_number_; }

◆ message() [1/2]

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

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

88 { return message_.c_str(); }

◆ message() [2/2]

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

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

88 { return message_.c_str(); }

◆ nonfatally_failed() [1/2]

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

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

◆ nonfatally_failed() [2/2]

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

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

◆ passed() [1/2]

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

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

◆ passed() [2/2]

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

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

◆ summary() [1/2]

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

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

85 { return summary_.c_str(); }

◆ summary() [2/2]

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

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

85 { return summary_.c_str(); }

◆ type() [1/2]

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

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

72 { return type_; }

◆ type() [2/2]

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 file: