diff options
Diffstat (limited to 'googletest/include/gtest/internal/custom/gtest.h')
-rw-r--r-- | googletest/include/gtest/internal/custom/gtest.h | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/googletest/include/gtest/internal/custom/gtest.h b/googletest/include/gtest/internal/custom/gtest.h index 20fb7bc..4c8e07b 100644 --- a/googletest/include/gtest/internal/custom/gtest.h +++ b/googletest/include/gtest/internal/custom/gtest.h @@ -34,105 +34,4 @@ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ -#include "gtest/gtest.h" -#include "third_party/googletest/googletest/src/gtest-internal-inl.h" - -#if GTEST_GOOGLE3_MODE_ - -#define GTEST_REMOVE_LEGACY_TEST_CASEAPI_ 1 - -#include <string> -#include <vector> - -namespace testing { -namespace internal { - -// In google3 we use ::InitGoogle instead. -#define GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_ \ - ::testing::internal::InitGoogleTestForGoogle3 -void InitGoogleTestForGoogle3(int* argc, char** argv); -void InitGoogleTestForGoogle3(int* argc, wchar_t** argv); - -#define GTEST_OS_STACK_TRACE_GETTER_ \ - ::testing::internal::Google3OsStackTraceGetter - -// Google3 implementation of the stack trace getter. -class Google3OsStackTraceGetter : public OsStackTraceGetterInterface { - public: - Google3OsStackTraceGetter() : caller_frame_(nullptr) {} - - std::string CurrentStackTrace(int max_depth, int skip_count) override - GTEST_LOCK_EXCLUDED_(mutex_); - - void UponLeavingGTest() override GTEST_LOCK_EXCLUDED_(mutex_); - - private: - Mutex mutex_; // protects all internal state - - // We save the stack frame below the frame that calls user code. - // We do this because the address of the frame immediately below - // the user code changes between the call to UponLeavingGTest() - // and any calls to CurrentStackTrace() from within the user code. - void* caller_frame_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(Google3OsStackTraceGetter); -}; - -#define GTEST_CUSTOM_TEST_EVENT_LISTENER_ \ - ::testing::internal::GoogleProcessStateListener - -// Report process state changes to Google3 base, after the unit test -// has been initialized, and before it is torn down, as well as at -// the start and end of each test case and test. -class GoogleProcessStateListener : public EmptyTestEventListener { - public: - GoogleProcessStateListener() {} - ~GoogleProcessStateListener() override; - - void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) override; - void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override; - void OnTestSuiteStart(const TestSuite& test_case) override; - void OnTestSuiteEnd(const TestSuite& test_case) override; - void OnTestStart(const TestInfo& test_info) override; - void OnTestEnd(const TestInfo& test_info) override; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(GoogleProcessStateListener); -}; // class GoogleProcessStateListener - - -// For KilledBySignal. -bool KilledBySignalOverride(int signum, int exit_status, bool* result); - -#define GTEST_KILLED_BY_SIGNAL_OVERRIDE_ \ - ::testing::internal::KilledBySignalOverride - -// Override --debugger_command (if any) with an empty one: -// we don't want the child to have a debugger automagically attaching -// to it when it (expectedly) dies. -// Also, enable --logtostderr. -::std::vector<std::string> GetGoogle3DeathTestCommandLineArgs(); - -#define GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_() \ - ::testing::internal::GetGoogle3DeathTestCommandLineArgs() - - -// For b/11021341, disable (slow) AddressToLineNumberDecorator. -void Google3DeathTestChildSetup(); - -#define GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_() \ - ::testing::internal::Google3DeathTestChildSetup() - -// returns temp directory for test in Google3 manner -std::string GetGoogle3TestTempDir(); - -// In google3 we use ::testing:GetTestTmpdir() instead. -#define GTEST_CUSTOM_TEMPDIR_FUNCTION_ \ - ::testing::internal::GetGoogle3TestTempDir - -} // namespace internal - -} // namespace testing -#endif // GTEST_GOOGLE3_MODE_ - #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ |