Port GoogleTest to QuRT (Hexagon RTOS)

This commit is contained in:
Marat Dukhan
2022-09-20 23:07:33 -07:00
parent 1336c4b6d1
commit 7a3abfec0a
5 changed files with 40 additions and 10 deletions

View File

@@ -51,6 +51,9 @@
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC
#include <unistd.h> // NOLINT
#endif
#if GTEST_OS_QURT
#include <qurt_event.h>
#endif
// Silence C4800 (C4800: 'int *const ': forcing value
// to bool 'true' or 'false') for MSVC 15
@@ -519,8 +522,12 @@ class MockObjectRegistry {
// RUN_ALL_TESTS() has already returned when this destructor is
// called. Therefore we cannot use the normal Google Test
// failure reporting mechanism.
#if GTEST_OS_QURT
qurt_exception_raise_fatal();
#else
_exit(1); // We cannot call exit() as it is not reentrant and
// may already have been called.
#endif
}
}