Googletest export

Remove the #ifs for old, unsupported and buggy compilers:
* old versions of GCC & MSVC
* Symbian

PiperOrigin-RevId: 227116941
This commit is contained in:
Abseil Team
2018-12-28 06:03:51 -05:00
committed by Gennadiy Civil
parent 933e5df283
commit f8b1c1af17
25 changed files with 66 additions and 344 deletions

View File

@@ -444,19 +444,12 @@ class IsNotZero : public ActionInterface<bool(int)> { // 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<int>'
// (point of instantiation: '@unnamed@gmock_actions_test_cc@::
// ActionTest_CanBeConvertedToOtherActionType_Test::TestBody()')
// with no obvious fix.
TEST(ActionTest, CanBeConvertedToOtherActionType) {
const Action<bool(int)> a1(new IsNotZero); // NOLINT
const Action<int(char)> a2 = Action<int(char)>(a1); // NOLINT
EXPECT_EQ(1, a2.Perform(std::make_tuple('a')));
EXPECT_EQ(0, a2.Perform(std::make_tuple('\0')));
}
#endif // !GTEST_OS_SYMBIAN
// The following two classes are for testing MakePolymorphicAction().
@@ -805,9 +798,7 @@ TEST(SetArgPointeeTest, SetsTheNthPointee) {
EXPECT_EQ('a', ch);
}
#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN)
// Tests that SetArgPointee<N>() accepts a string literal.
// GCC prior to v4.0 and the Symbian compiler do not support this.
TEST(SetArgPointeeTest, AcceptsStringLiteral) {
typedef void MyFunction(std::string*, const char**);
Action<MyFunction> a = SetArgPointee<0>("hi");
@@ -841,7 +832,6 @@ TEST(SetArgPointeeTest, AcceptsWideStringLiteral) {
# endif
}
#endif
// Tests that SetArgPointee<N>() accepts a char pointer.
TEST(SetArgPointeeTest, AcceptsCharPointer) {