proxygen
testing::TestEventListeners Class Reference

#include <gtest.h>

Public Member Functions

 TestEventListeners ()
 
 ~TestEventListeners ()
 
void Append (TestEventListener *listener)
 
TestEventListenerRelease (TestEventListener *listener)
 
TestEventListenerdefault_result_printer () const
 
TestEventListenerdefault_xml_generator () const
 
 TestEventListeners ()
 
 ~TestEventListeners ()
 
void Append (TestEventListener *listener)
 
TestEventListenerRelease (TestEventListener *listener)
 
TestEventListenerdefault_result_printer () const
 
TestEventListenerdefault_xml_generator () const
 
 TestEventListeners ()
 
 ~TestEventListeners ()
 
void Append (TestEventListener *listener)
 
TestEventListenerRelease (TestEventListener *listener)
 
TestEventListenerdefault_result_printer () const
 
TestEventListenerdefault_xml_generator () const
 

Private Member Functions

TestEventListenerrepeater ()
 
void SetDefaultResultPrinter (TestEventListener *listener)
 
void SetDefaultXmlGenerator (TestEventListener *listener)
 
bool EventForwardingEnabled () const
 
void SuppressEventForwarding ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestEventListeners)
 
TestEventListenerrepeater ()
 
void SetDefaultResultPrinter (TestEventListener *listener)
 
void SetDefaultXmlGenerator (TestEventListener *listener)
 
bool EventForwardingEnabled () const
 
void SuppressEventForwarding ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestEventListeners)
 
TestEventListenerrepeater ()
 
void SetDefaultResultPrinter (TestEventListener *listener)
 
void SetDefaultXmlGenerator (TestEventListener *listener)
 
bool EventForwardingEnabled () const
 
void SuppressEventForwarding ()
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (TestEventListeners)
 

Private Attributes

internal::TestEventRepeaterrepeater_
 
TestEventListenerdefault_result_printer_
 
TestEventListenerdefault_xml_generator_
 

Friends

class TestCase
 
class TestInfo
 
class internal::DefaultGlobalTestPartResultReporter
 
class internal::NoExecDeathTest
 
class internal::TestEventListenersAccessor
 
class internal::UnitTestImpl
 

Detailed Description

Definition at line 1064 of file gtest.h.

Constructor & Destructor Documentation

testing::TestEventListeners::TestEventListeners ( )

Definition at line 3890 of file gtest.cc.

Referenced by testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

3891  : repeater_(new internal::TestEventRepeater()),
3893  default_xml_generator_(NULL) {
3894 }
TestEventListener * default_result_printer_
Definition: gtest.h:1133
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
internal::TestEventRepeater * repeater_
Definition: gtest.h:1131
testing::TestEventListeners::~TestEventListeners ( )

Definition at line 3896 of file gtest.cc.

References repeater_.

Referenced by testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

3896 { delete repeater_; }
internal::TestEventRepeater * repeater_
Definition: gtest.h:1131
testing::TestEventListeners::TestEventListeners ( )
testing::TestEventListeners::~TestEventListeners ( )
testing::TestEventListeners::TestEventListeners ( )
testing::TestEventListeners::~TestEventListeners ( )

Member Function Documentation

void testing::TestEventListeners::Append ( TestEventListener listener)
void testing::TestEventListeners::Append ( TestEventListener listener)
TestEventListener* testing::TestEventListeners::default_result_printer ( ) const
inline

Definition at line 1084 of file gtest.h.

1084  {
1085  return default_result_printer_;
1086  }
TestEventListener * default_result_printer_
Definition: gtest.h:1133
TestEventListener* testing::TestEventListeners::default_result_printer ( ) const
inline

Definition at line 1084 of file gtest.h.

Referenced by TEST().

1084  {
1085  return default_result_printer_;
1086  }
TestEventListener * default_result_printer_
Definition: gtest.h:1133
TestEventListener* testing::TestEventListeners::default_result_printer ( ) const
inline

Definition at line 1084 of file gtest.h.

1084  {
1085  return default_result_printer_;
1086  }
TestEventListener * default_result_printer_
Definition: gtest.h:1133
TestEventListener* testing::TestEventListeners::default_xml_generator ( ) const
inline

Definition at line 1095 of file gtest.h.

Referenced by TEST().

1095  {
1096  return default_xml_generator_;
1097  }
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
TestEventListener* testing::TestEventListeners::default_xml_generator ( ) const
inline

Definition at line 1095 of file gtest.h.

References GTEST_API_, GTEST_DISALLOW_COPY_AND_ASSIGN_, GTEST_LOCK_EXCLUDED_, GTEST_MUST_USE_RESULT_, i, mutex_, Run(), string, and value.

1095  {
1096  return default_xml_generator_;
1097  }
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
TestEventListener* testing::TestEventListeners::default_xml_generator ( ) const
inline

Definition at line 1095 of file gtest.h.

References GTEST_API_, GTEST_DISALLOW_COPY_AND_ASSIGN_, GTEST_LOCK_EXCLUDED_, GTEST_MUST_USE_RESULT_, i, mutex_, Run(), string, and value.

1095  {
1096  return default_xml_generator_;
1097  }
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
bool testing::TestEventListeners::EventForwardingEnabled ( ) const
private
bool testing::TestEventListeners::EventForwardingEnabled ( ) const
private
bool testing::TestEventListeners::EventForwardingEnabled ( ) const
private
testing::TestEventListeners::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestEventListeners  )
private
testing::TestEventListeners::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestEventListeners  )
private
testing::TestEventListeners::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( TestEventListeners  )
private
TestEventListener* testing::TestEventListeners::Release ( TestEventListener listener)
TestEventListener * testing::TestEventListeners::Release ( TestEventListener listener)

Definition at line 3909 of file gtest.cc.

References default_result_printer_, default_xml_generator_, testing::internal::TestEventRepeater::Release(), and repeater_.

Referenced by SetDefaultResultPrinter(), SetDefaultXmlGenerator(), TEST(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

3909  {
3910  if (listener == default_result_printer_)
3911  default_result_printer_ = NULL;
3912  else if (listener == default_xml_generator_)
3913  default_xml_generator_ = NULL;
3914  return repeater_->Release(listener);
3915 }
TestEventListener * default_result_printer_
Definition: gtest.h:1133
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
internal::TestEventRepeater * repeater_
Definition: gtest.h:1131
TestEventListener * Release(TestEventListener *listener)
Definition: gtest.cc:3281
TestEventListener* testing::TestEventListeners::Release ( TestEventListener listener)
TestEventListener* testing::TestEventListeners::repeater ( )
private
TestEventListener* testing::TestEventListeners::repeater ( )
private
void testing::TestEventListeners::SetDefaultResultPrinter ( TestEventListener listener)
private
void testing::TestEventListeners::SetDefaultResultPrinter ( TestEventListener listener)
private
void testing::TestEventListeners::SetDefaultResultPrinter ( TestEventListener listener)
private

Definition at line 3926 of file gtest.cc.

References Append(), default_result_printer_, and Release().

Referenced by testing::internal::TestEventListenersAccessor::SetDefaultResultPrinter(), testing::internal::UnitTestImpl::UnitTestImpl(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

3926  {
3927  if (default_result_printer_ != listener) {
3928  // It is an error to pass this method a listener that is already in the
3929  // list.
3931  default_result_printer_ = listener;
3932  if (listener != NULL)
3933  Append(listener);
3934  }
3935 }
TestEventListener * Release(TestEventListener *listener)
Definition: gtest.cc:3909
void Append(TestEventListener *listener)
Definition: gtest.cc:3902
TestEventListener * default_result_printer_
Definition: gtest.h:1133
void testing::TestEventListeners::SetDefaultXmlGenerator ( TestEventListener listener)
private
void testing::TestEventListeners::SetDefaultXmlGenerator ( TestEventListener listener)
private

Definition at line 3942 of file gtest.cc.

References Append(), default_xml_generator_, and Release().

Referenced by testing::internal::UnitTestImpl::ConfigureXmlOutput(), testing::internal::TestEventListenersAccessor::SetDefaultXmlGenerator(), and testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile().

3942  {
3943  if (default_xml_generator_ != listener) {
3944  // It is an error to pass this method a listener that is already in the
3945  // list.
3947  default_xml_generator_ = listener;
3948  if (listener != NULL)
3949  Append(listener);
3950  }
3951 }
TestEventListener * Release(TestEventListener *listener)
Definition: gtest.cc:3909
void Append(TestEventListener *listener)
Definition: gtest.cc:3902
TestEventListener * default_xml_generator_
Definition: gtest.h:1135
void testing::TestEventListeners::SetDefaultXmlGenerator ( TestEventListener listener)
private
void testing::TestEventListeners::SuppressEventForwarding ( )
private
void testing::TestEventListeners::SuppressEventForwarding ( )
private

Friends And Related Function Documentation

Definition at line 1102 of file gtest.h.

internal::NoExecDeathTest
friend

Definition at line 1103 of file gtest.h.

Definition at line 1104 of file gtest.h.

Definition at line 1105 of file gtest.h.

TestCase
friend

Definition at line 1100 of file gtest.h.

TestInfo
friend

Definition at line 1101 of file gtest.h.

Member Data Documentation

TestEventListener * testing::TestEventListeners::default_result_printer_
private

Definition at line 1133 of file gtest.h.

Referenced by Release(), and SetDefaultResultPrinter().

TestEventListener * testing::TestEventListeners::default_xml_generator_
private

Definition at line 1135 of file gtest.h.

Referenced by Release(), and SetDefaultXmlGenerator().

internal::TestEventRepeater * testing::TestEventListeners::repeater_
private

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