Makes the code compile on Windows CE.

This commit is contained in:
zhanyong.wan
2009-03-11 23:37:56 +00:00
parent 93ad3551c0
commit 5b5d62f190
5 changed files with 50 additions and 6 deletions

View File

@@ -69,7 +69,10 @@ using testing::ReturnNull;
using testing::ReturnRef;
using testing::SetArgumentPointee;
using testing::SetArrayArgument;
#ifndef _WIN32_WCE
using testing::SetErrnoAndReturn;
#endif // _WIN32_WCE
#if GMOCK_HAS_PROTOBUF_
using testing::internal::TestMessage;
@@ -951,6 +954,8 @@ TEST(AssignTest, CompatibleTypes) {
EXPECT_DOUBLE_EQ(5, x);
}
#ifndef _WIN32_WCE
class SetErrnoAndReturnTest : public testing::Test {
protected:
virtual void SetUp() { errno = 0; }
@@ -976,4 +981,6 @@ TEST_F(SetErrnoAndReturnTest, CompatibleTypes) {
EXPECT_EQ(EINVAL, errno);
}
#endif // _WIN32_WCE
} // Unnamed namespace

View File

@@ -116,7 +116,10 @@
#include <gmock/gmock.h>
#ifndef _WIN32_WCE
#include <errno.h>
#endif
#include <gtest/gtest.h>
#include <iostream>
#include <vector>
@@ -161,7 +164,6 @@ using testing::ReturnNull;
using testing::ReturnRef;
using testing::SetArgumentPointee;
using testing::SetArrayArgument;
using testing::SetErrnoAndReturn;
using testing::StartsWith;
using testing::StrCaseEq;
using testing::StrCaseNe;
@@ -173,6 +175,10 @@ using testing::WithArg;
using testing::WithArgs;
using testing::WithoutArgs;
#ifndef _WIN32_WCE
using testing::SetErrnoAndReturn;
#endif // _WIN32_WCE
#if GTEST_HAS_EXCEPTIONS
using testing::Throw;
#endif // GTEST_HAS_EXCEPTIONS
@@ -290,6 +296,8 @@ TEST(LinkTest, TestSetArrayArgument) {
mock.VoidFromString(&ch);
}
#ifndef _WIN32_WCE
// Tests the linkage of the SetErrnoAndReturn action.
TEST(LinkTest, TestSetErrnoAndReturn) {
Mock mock;
@@ -300,6 +308,8 @@ TEST(LinkTest, TestSetErrnoAndReturn) {
errno = saved_errno;
}
#endif // _WIN32_WCE
// Tests the linkage of the Invoke(function) and Invoke(object, method) actions.
TEST(LinkTest, TestInvoke) {
Mock mock;