// Some use needs to be in the global namespace # define SAVE_GDB_SLEEP_GLOBAL(v) \
v = ::_gdb_sleep_duration; \
ZERO_GDB_SLEEP(); # define RESTORE_GDB_SLEEP_GLOBAL(v) ::_gdb_sleep_duration = v;
// Death tests are too slow on OSX because of the system crash reporter. #if !defined(XP_DARWIN) // Wrap ASSERT_DEATH_IF_SUPPORTED to disable the crash reporter // when entering the subprocess, so that the expected crashes don't // create a minidump that the gtest harness will interpret as an error. # define ASSERT_DEATH_WRAP(a, b) \
ASSERT_DEATH_IF_SUPPORTED( \
{ \
mozilla::gtest::DisableCrashReporter(); \
a; \
}, \
b)
// Wrap EXPECT_DEATH_* macros to also disable the crash reporter. # define EXPECT_DEATH_WRAP(a, b) \
EXPECT_DEATH_IF_SUPPORTED( \
{ \
mozilla::gtest::DisableCrashReporter(); \
a; \
}, \
b) # define EXPECT_DEBUG_DEATH_WRAP(a, b) \
EXPECT_DEBUG_DEATH( \
{ \
mozilla::gtest::DisableCrashReporter(); \
a; \
}, \
b) #else # define ASSERT_DEATH_WRAP(a, b) # define EXPECT_DEATH_WRAP(a, b) # define EXPECT_DEBUG_DEATH_WRAP(a, b) #endif
/** *ExitmodeusedforScopedTestResultReporter.
*/ enumclass ExitMode { // The user of the reporter handles exit.
NoExit, // As the reporter goes out of scope, exit with ExitCode().
ExitOnDtor,
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.