From 95b12332c345cee508a8e2b68e007280392506e0 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Fri, 25 Sep 2009 18:55:50 +0000 Subject: Makes gmock work on Symbian (both 3rd & 5th editions), original patch contributed by Mika Raento. --- test/gmock-actions_test.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'test/gmock-actions_test.cc') diff --git a/test/gmock-actions_test.cc b/test/gmock-actions_test.cc index 5d05bc50..d3d96c6d 100644 --- a/test/gmock-actions_test.cc +++ b/test/gmock-actions_test.cc @@ -98,11 +98,13 @@ TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) { EXPECT_EQ(0, BuiltInDefaultValue::Get()); EXPECT_EQ(0, BuiltInDefaultValue::Get()); EXPECT_EQ(0, BuiltInDefaultValue::Get()); -#if !GTEST_OS_WINDOWS +#if GMOCK_HAS_SIGNED_WCHAR_T_ EXPECT_EQ(0, BuiltInDefaultValue::Get()); EXPECT_EQ(0, BuiltInDefaultValue::Get()); -#endif // !GTEST_OS_WINDOWS +#endif +#if GMOCK_WCHAR_T_IS_NATIVE_ EXPECT_EQ(0, BuiltInDefaultValue::Get()); +#endif EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT EXPECT_EQ(0, BuiltInDefaultValue::Get()); // NOLINT @@ -124,11 +126,13 @@ TEST(BuiltInDefaultValueTest, ExistsForNumericTypes) { EXPECT_TRUE(BuiltInDefaultValue::Exists()); EXPECT_TRUE(BuiltInDefaultValue::Exists()); EXPECT_TRUE(BuiltInDefaultValue::Exists()); -#if !GTEST_OS_WINDOWS +#if GMOCK_HAS_SIGNED_WCHAR_T_ EXPECT_TRUE(BuiltInDefaultValue::Exists()); EXPECT_TRUE(BuiltInDefaultValue::Exists()); -#endif // !GTEST_OS_WINDOWS +#endif +#if GMOCK_WCHAR_T_IS_NATIVE_ EXPECT_TRUE(BuiltInDefaultValue::Exists()); +#endif EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT EXPECT_TRUE(BuiltInDefaultValue::Exists()); // NOLINT @@ -395,12 +399,19 @@ class IsNotZero : public ActionInterface { // NOLINT } }; +#if !GTEST_OS_SYMBIAN +// Compiling this test on Nokia's Symbian compiler fails with: +// 'Result' is not a member of class 'testing::internal::Function' +// (point of instantiation: '@unnamed@gmock_actions_test_cc@:: +// ActionTest_CanBeConvertedToOtherActionType_Test::TestBody()') +// with no obvious fix. TEST(ActionTest, CanBeConvertedToOtherActionType) { const Action a1(new IsNotZero); // NOLINT const Action a2 = Action(a1); // NOLINT EXPECT_EQ(1, a2.Perform(make_tuple('a'))); EXPECT_EQ(0, a2.Perform(make_tuple('\0'))); } +#endif // !GTEST_OS_SYMBIAN // The following two classes are for testing MakePolymorphicAction(). -- cgit v1.2.3