Makes gtest work on Windows Mobile and Symbian. By Mika Raento.

This commit is contained in:
shiqian
2008-07-31 18:34:08 +00:00
parent dc6ee0e36d
commit bf9b4b48dc
8 changed files with 200 additions and 22 deletions

View File

@@ -32,16 +32,22 @@
#include <gtest/internal/gtest-port.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef GTEST_HAS_DEATH_TEST
#include <regex.h>
#endif // GTEST_HAS_DEATH_TEST
#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32_WCE
#include <windows.h> // For TerminateProcess()
#endif // _WIN32_WCE
#include <gtest/gtest-spi.h>
#include <gtest/gtest-message.h>
#include <gtest/internal/gtest-string.h>
namespace testing {
namespace internal {
@@ -194,6 +200,13 @@ const ::std::vector<String>& GetArgvs() { return g_argvs; }
#endif // GTEST_HAS_DEATH_TEST
#ifdef _WIN32_WCE
void abort() {
DebugBreak();
TerminateProcess(GetCurrentProcess(), 1);
}
#endif // _WIN32_WCE
// Returns the name of the environment variable corresponding to the
// given flag. For example, FlagToEnvVar("foo") will return
// "GTEST_FOO" in the open-source version.