proxygen
testing::internal::ScopedPrematureExitFile Class Reference

Public Member Functions

 ScopedPrematureExitFile (const char *premature_exit_filepath)
 
 ~ScopedPrematureExitFile ()
 
 ScopedPrematureExitFile (const char *premature_exit_filepath)
 
 ~ScopedPrematureExitFile ()
 
 ScopedPrematureExitFile (const char *premature_exit_filepath)
 
 ~ScopedPrematureExitFile ()
 

Private Member Functions

 GTEST_DISALLOW_COPY_AND_ASSIGN_ (ScopedPrematureExitFile)
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (ScopedPrematureExitFile)
 
 GTEST_DISALLOW_COPY_AND_ASSIGN_ (ScopedPrematureExitFile)
 

Private Attributes

const char *const premature_exit_filepath_
 

Detailed Description

Definition at line 3859 of file gtest.cc.

Constructor & Destructor Documentation

testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile ( const char *  premature_exit_filepath)
inlineexplicit

Definition at line 3861 of file gtest.cc.

References FILE, and testing::internal::posix::FOpen().

3862  : premature_exit_filepath_(premature_exit_filepath) {
3863  // If a path to the premature-exit file is specified...
3864  if (premature_exit_filepath != NULL && *premature_exit_filepath != '\0') {
3865  // create the file with a single "0" character in it. I/O
3866  // errors are ignored as there's nothing better we can do and we
3867  // don't want to fail the test because of this.
3868  FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
3869  fwrite("0", 1, 1, pfile);
3870  fclose(pfile);
3871  }
3872  }
FILE * FOpen(const char *path, const char *mode)
Definition: gtest-port.h:2367
const char *const premature_exit_filepath_
Definition: gtest.cc:3881
GMockOutputTest ExpectedCall FILE
testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile ( )
inline

Definition at line 3874 of file gtest.cc.

3874  {
3875  if (premature_exit_filepath_ != NULL && *premature_exit_filepath_ != '\0') {
3876  remove(premature_exit_filepath_);
3877  }
3878  }
const char *const premature_exit_filepath_
Definition: gtest.cc:3881
testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile ( const char *  premature_exit_filepath)
inlineexplicit

Definition at line 3861 of file gtest.cc.

References FILE, and testing::internal::posix::FOpen().

3862  : premature_exit_filepath_(premature_exit_filepath) {
3863  // If a path to the premature-exit file is specified...
3864  if (premature_exit_filepath != NULL && *premature_exit_filepath != '\0') {
3865  // create the file with a single "0" character in it. I/O
3866  // errors are ignored as there's nothing better we can do and we
3867  // don't want to fail the test because of this.
3868  FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
3869  fwrite("0", 1, 1, pfile);
3870  fclose(pfile);
3871  }
3872  }
FILE * FOpen(const char *path, const char *mode)
Definition: gtest-port.h:2367
const char *const premature_exit_filepath_
Definition: gtest.cc:3881
GMockOutputTest ExpectedCall FILE
testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile ( )
inline

Definition at line 3874 of file gtest.cc.

References testing::UnitTest::ad_hoc_test_result(), testing::UnitTest::AddEnvironment(), testing::UnitTest::AddTestPartResult(), testing::TestEventListeners::Append(), testing::internal::UnitTestImpl::ConfigureXmlOutput(), testing::UnitTest::current_test_case(), testing::UnitTest::current_test_info(), testing::UnitTest::disabled_test_count(), testing::UnitTest::elapsed_time(), testing::TestEventListeners::EventForwardingEnabled(), testing::UnitTest::Failed(), testing::UnitTest::failed_test_case_count(), testing::UnitTest::failed_test_count(), testing::internal::TraceInfo::file, testing::internal::ForEach(), testing::internal::FormatFileLocation(), testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(), testing::internal::posix::GetEnv(), testing::UnitTest::GetInstance(), testing::UnitTest::GetMutableTestCase(), testing::internal::UnitTestOptions::GetOutputFormat(), testing::Message::GetString(), testing::UnitTest::GetTestCase(), GTEST_DISABLE_MSC_WARNINGS_POP_, GTEST_DISABLE_MSC_WARNINGS_PUSH_, GTEST_DISALLOW_COPY_AND_ASSIGN_, GTEST_FLAG, GTEST_LOCK_EXCLUDED_, GTEST_NAME_, testing::internal::HandleExceptionsInMethodIfSupported(), i, testing::internal::kStackTraceMarker, testing::TestPartResult::kSuccess, testing::internal::TraceInfo::line, testing::UnitTest::listeners(), folly::detail::lock(), message, testing::internal::TraceInfo::message, mutex_, testing::UnitTest::original_working_dir(), parent, testing::UnitTest::Passed(), testing::UnitTest::PopGTestTrace(), testing::internal::UnitTestImpl::PostFlagParsingInit(), testing::UnitTest::PushGTestTrace(), testing::UnitTest::random_seed(), testing::TestResult::RecordProperty(), testing::internal::UnitTestImpl::RecordProperty(), testing::UnitTest::RecordProperty(), testing::TestEventListeners::Release(), testing::TestEventListeners::repeater(), testing::UnitTest::reportable_disabled_test_count(), testing::UnitTest::reportable_test_count(), testing::UnitTest::Run(), testing::internal::UnitTestImpl::RunAllTests(), testing::TestEventListeners::SetDefaultResultPrinter(), testing::TestEventListeners::SetDefaultXmlGenerator(), testing::UnitTest::start_timestamp(), string, testing::UnitTest::successful_test_case_count(), testing::UnitTest::successful_test_count(), testing::TestEventListeners::SuppressEventForwarding(), testing::UnitTest::test_case_to_run_count(), testing::UnitTest::test_to_run_count(), testing::TestEventListeners::TestEventListeners(), testing::UnitTest::total_test_case_count(), testing::UnitTest::total_test_count(), testing::UnitTest::UnitTest(), testing::internal::UnitTestImpl::UnitTestImpl(), testing::TestEventListeners::~TestEventListeners(), testing::UnitTest::~UnitTest(), and testing::internal::UnitTestImpl::~UnitTestImpl().

3874  {
3875  if (premature_exit_filepath_ != NULL && *premature_exit_filepath_ != '\0') {
3876  remove(premature_exit_filepath_);
3877  }
3878  }
const char *const premature_exit_filepath_
Definition: gtest.cc:3881
testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile ( const char *  premature_exit_filepath)
inlineexplicit

Definition at line 3861 of file gtest.cc.

References FILE, and testing::internal::posix::FOpen().

3862  : premature_exit_filepath_(premature_exit_filepath) {
3863  // If a path to the premature-exit file is specified...
3864  if (premature_exit_filepath != NULL && *premature_exit_filepath != '\0') {
3865  // create the file with a single "0" character in it. I/O
3866  // errors are ignored as there's nothing better we can do and we
3867  // don't want to fail the test because of this.
3868  FILE* pfile = posix::FOpen(premature_exit_filepath, "w");
3869  fwrite("0", 1, 1, pfile);
3870  fclose(pfile);
3871  }
3872  }
FILE * FOpen(const char *path, const char *mode)
Definition: gtest-port.h:2367
const char *const premature_exit_filepath_
Definition: gtest.cc:3881
GMockOutputTest ExpectedCall FILE
testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile ( )
inline

Definition at line 3874 of file gtest.cc.

References testing::UnitTest::ad_hoc_test_result(), testing::UnitTest::AddEnvironment(), testing::UnitTest::AddTestPartResult(), testing::TestEventListeners::Append(), testing::internal::UnitTestImpl::ConfigureXmlOutput(), testing::UnitTest::current_test_case(), testing::UnitTest::current_test_info(), testing::UnitTest::disabled_test_count(), testing::UnitTest::elapsed_time(), testing::TestEventListeners::EventForwardingEnabled(), testing::UnitTest::Failed(), testing::UnitTest::failed_test_case_count(), testing::UnitTest::failed_test_count(), testing::internal::TraceInfo::file, testing::internal::ForEach(), testing::internal::FormatFileLocation(), testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(), testing::internal::posix::GetEnv(), testing::UnitTest::GetInstance(), testing::UnitTest::GetMutableTestCase(), testing::internal::UnitTestOptions::GetOutputFormat(), testing::Message::GetString(), testing::UnitTest::GetTestCase(), GTEST_DISABLE_MSC_WARNINGS_POP_, GTEST_DISABLE_MSC_WARNINGS_PUSH_, GTEST_DISALLOW_COPY_AND_ASSIGN_, GTEST_FLAG, GTEST_LOCK_EXCLUDED_, GTEST_NAME_, testing::internal::HandleExceptionsInMethodIfSupported(), i, testing::internal::kStackTraceMarker, testing::TestPartResult::kSuccess, testing::internal::TraceInfo::line, testing::UnitTest::listeners(), folly::detail::lock(), message, testing::internal::TraceInfo::message, mutex_, testing::UnitTest::original_working_dir(), parent, testing::UnitTest::Passed(), testing::UnitTest::PopGTestTrace(), testing::internal::UnitTestImpl::PostFlagParsingInit(), testing::UnitTest::PushGTestTrace(), testing::UnitTest::random_seed(), testing::TestResult::RecordProperty(), testing::internal::UnitTestImpl::RecordProperty(), testing::UnitTest::RecordProperty(), testing::TestEventListeners::Release(), testing::TestEventListeners::repeater(), testing::UnitTest::reportable_disabled_test_count(), testing::UnitTest::reportable_test_count(), testing::UnitTest::Run(), testing::internal::UnitTestImpl::RunAllTests(), testing::TestEventListeners::SetDefaultResultPrinter(), testing::TestEventListeners::SetDefaultXmlGenerator(), testing::UnitTest::start_timestamp(), string, testing::UnitTest::successful_test_case_count(), testing::UnitTest::successful_test_count(), testing::TestEventListeners::SuppressEventForwarding(), testing::UnitTest::test_case_to_run_count(), testing::UnitTest::test_to_run_count(), testing::TestEventListeners::TestEventListeners(), testing::UnitTest::total_test_case_count(), testing::UnitTest::total_test_count(), testing::UnitTest::UnitTest(), testing::internal::UnitTestImpl::UnitTestImpl(), testing::TestEventListeners::~TestEventListeners(), testing::UnitTest::~UnitTest(), and testing::internal::UnitTestImpl::~UnitTestImpl().

3874  {
3875  if (premature_exit_filepath_ != NULL && *premature_exit_filepath_ != '\0') {
3876  remove(premature_exit_filepath_);
3877  }
3878  }
const char *const premature_exit_filepath_
Definition: gtest.cc:3881

Member Function Documentation

testing::internal::ScopedPrematureExitFile::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( ScopedPrematureExitFile  )
private
testing::internal::ScopedPrematureExitFile::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( ScopedPrematureExitFile  )
private
testing::internal::ScopedPrematureExitFile::GTEST_DISALLOW_COPY_AND_ASSIGN_ ( ScopedPrematureExitFile  )
private

Member Data Documentation

const char *const testing::internal::ScopedPrematureExitFile::premature_exit_filepath_
private

Definition at line 3881 of file gtest.cc.


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