summaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-actions_test.cc12
-rw-r--r--googlemock/test/gmock-function-mocker_test.cc2
-rw-r--r--googlemock/test/gmock-generated-function-mockers_test.cc2
-rw-r--r--googlemock/test/gmock-generated-matchers_test.cc4
-rw-r--r--googlemock/test/gmock-internal-utils_test.cc8
-rw-r--r--googlemock/test/gmock-matchers_test.cc44
-rw-r--r--googlemock/test/gmock-nice-strict_test.cc27
7 files changed, 9 insertions, 90 deletions
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index 938a11b..f27d55a 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -220,7 +220,6 @@ class MyNonDefaultConstructible {
int value_;
};
-#if GTEST_LANG_CXX11
TEST(BuiltInDefaultValueTest, ExistsForDefaultConstructibleType) {
EXPECT_TRUE(BuiltInDefaultValue<MyDefaultConstructible>::Exists());
@@ -230,7 +229,6 @@ TEST(BuiltInDefaultValueTest, IsDefaultConstructedForDefaultConstructibleType) {
EXPECT_EQ(42, BuiltInDefaultValue<MyDefaultConstructible>::Get().value());
}
-#endif // GTEST_LANG_CXX11
TEST(BuiltInDefaultValueTest, DoesNotExistForNonDefaultConstructibleType) {
EXPECT_FALSE(BuiltInDefaultValue<MyNonDefaultConstructible>::Exists());
@@ -300,7 +298,6 @@ TEST(DefaultValueDeathTest, GetReturnsBuiltInDefaultValueWhenUnset) {
}, "");
}
-#if GTEST_HAS_STD_UNIQUE_PTR_
TEST(DefaultValueTest, GetWorksForMoveOnlyIfSet) {
EXPECT_TRUE(DefaultValue<std::unique_ptr<int>>::Exists());
EXPECT_TRUE(DefaultValue<std::unique_ptr<int>>::Get() == nullptr);
@@ -311,7 +308,6 @@ TEST(DefaultValueTest, GetWorksForMoveOnlyIfSet) {
std::unique_ptr<int> i = DefaultValue<std::unique_ptr<int>>::Get();
EXPECT_EQ(42, *i);
}
-#endif // GTEST_HAS_STD_UNIQUE_PTR_
// Tests that DefaultValue<void>::Get() returns void.
TEST(DefaultValueTest, GetWorksForVoid) {
@@ -643,7 +639,6 @@ TEST(ReturnNullTest, WorksInPointerReturningFunction) {
EXPECT_TRUE(a2.Perform(std::make_tuple(true)) == nullptr);
}
-#if GTEST_HAS_STD_UNIQUE_PTR_
// Tests that ReturnNull() returns NULL for shared_ptr and unique_ptr returning
// functions.
TEST(ReturnNullTest, WorksInSmartPointerReturningFunction) {
@@ -653,7 +648,6 @@ TEST(ReturnNullTest, WorksInSmartPointerReturningFunction) {
const Action<std::shared_ptr<int>(std::string)> a2 = ReturnNull();
EXPECT_TRUE(a2.Perform(std::make_tuple("foo")) == nullptr);
}
-#endif // GTEST_HAS_STD_UNIQUE_PTR_
// Tests that ReturnRef(v) works for reference types.
TEST(ReturnRefTest, WorksForReference) {
@@ -706,14 +700,12 @@ class MockClass {
MOCK_METHOD1(IntFunc, int(bool flag)); // NOLINT
MOCK_METHOD0(Foo, MyNonDefaultConstructible());
-#if GTEST_HAS_STD_UNIQUE_PTR_
MOCK_METHOD0(MakeUnique, std::unique_ptr<int>());
MOCK_METHOD0(MakeUniqueBase, std::unique_ptr<Base>());
MOCK_METHOD0(MakeVectorUnique, std::vector<std::unique_ptr<int>>());
MOCK_METHOD1(TakeUnique, int(std::unique_ptr<int>));
MOCK_METHOD2(TakeUnique,
int(const std::unique_ptr<int>&, std::unique_ptr<int>));
-#endif
private:
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockClass);
@@ -1265,7 +1257,6 @@ TEST(ByRefTest, PrintsCorrectly) {
EXPECT_EQ(expected.str(), actual.str());
}
-#if GTEST_HAS_STD_UNIQUE_PTR_
std::unique_ptr<int> UniquePtrSource() {
return std::unique_ptr<int>(new int(19));
@@ -1378,9 +1369,7 @@ TEST(MockMethodTest, CanTakeMoveOnlyValue) {
EXPECT_EQ(42, *saved);
}
-#endif // GTEST_HAS_STD_UNIQUE_PTR_
-#if GTEST_LANG_CXX11
// Tests for std::function based action.
int Add(int val, int& ref, int* ptr) { // NOLINT
@@ -1476,7 +1465,6 @@ TEST(MoveOnlyArgumentsTest, ReturningActions) {
EXPECT_EQ(x, 3);
}
-#endif // GTEST_LANG_CXX11
} // Unnamed namespace
diff --git a/googlemock/test/gmock-function-mocker_test.cc b/googlemock/test/gmock-function-mocker_test.cc
index 007e86c..294b21d 100644
--- a/googlemock/test/gmock-function-mocker_test.cc
+++ b/googlemock/test/gmock-function-mocker_test.cc
@@ -598,7 +598,6 @@ TEST(MockMethodMockFunctionTest, WorksFor10Arguments) {
EXPECT_EQ(2, foo.Call(true, 'a', 0, 0, 0, 0, 0, 'b', 1, false));
}
-#if GTEST_HAS_STD_FUNCTION_
TEST(MockMethodMockFunctionTest, AsStdFunction) {
MockFunction<int(int)> foo;
auto call = [](const std::function<int(int)> &f, int i) {
@@ -630,7 +629,6 @@ TEST(MockMethodMockFunctionTest, AsStdFunctionWithReferenceParameter) {
EXPECT_EQ(-1, call(foo.AsStdFunction(), i));
}
-#endif // GTEST_HAS_STD_FUNCTION_
struct MockMethodSizes0 {
MOCK_METHOD(void, func, ());
diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc
index 79130bc..52d9b8b 100644
--- a/googlemock/test/gmock-generated-function-mockers_test.cc
+++ b/googlemock/test/gmock-generated-function-mockers_test.cc
@@ -582,7 +582,6 @@ TEST(MockFunctionTest, WorksFor10Arguments) {
EXPECT_EQ(2, foo.Call(true, 'a', 0, 0, 0, 0, 0, 'b', 1, false));
}
-#if GTEST_HAS_STD_FUNCTION_
TEST(MockFunctionTest, AsStdFunction) {
MockFunction<int(int)> foo;
auto call = [](const std::function<int(int)> &f, int i) {
@@ -614,7 +613,6 @@ TEST(MockFunctionTest, AsStdFunctionWithReferenceParameter) {
EXPECT_EQ(-1, call(foo.AsStdFunction(), i));
}
-#endif // GTEST_HAS_STD_FUNCTION_
struct MockMethodSizes0 {
MOCK_METHOD0(func, void());
diff --git a/googlemock/test/gmock-generated-matchers_test.cc b/googlemock/test/gmock-generated-matchers_test.cc
index 727c8ea..426e954 100644
--- a/googlemock/test/gmock-generated-matchers_test.cc
+++ b/googlemock/test/gmock-generated-matchers_test.cc
@@ -489,7 +489,6 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithVector) {
EXPECT_THAT(test_vector, Not(ElementsAreArray(expected)));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(ElementsAreArrayTest, TakesInitializerList) {
const int a[5] = { 1, 2, 3, 4, 5 };
@@ -525,7 +524,6 @@ TEST(ElementsAreArrayTest,
{ Eq(1), Ne(-2), Ge(3), Le(4), Eq(6) })));
}
-#endif // GTEST_HAS_STD_INITIALIZER_LIST_
TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherVector) {
const int a[] = { 1, 2, 3 };
@@ -1139,7 +1137,6 @@ TEST(AnyOfTest, DoesNotCallAnyOfUnqualified) {
} // namespace adl_test
-#if GTEST_LANG_CXX11
TEST(AllOfTest, WorksOnMoveOnlyType) {
std::unique_ptr<int> p(new int(3));
@@ -1177,7 +1174,6 @@ TEST(MatcherPMacroTest, WorksOnMoveOnlyType) {
EXPECT_THAT(p, Not(UniquePointee(2)));
}
-#endif // GTEST_LASNG_CXX11
} // namespace
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc
index 48fcacc..4c36cfb 100644
--- a/googlemock/test/gmock-internal-utils_test.cc
+++ b/googlemock/test/gmock-internal-utils_test.cc
@@ -123,13 +123,9 @@ TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameIsMixture) {
}
TEST(PointeeOfTest, WorksForSmartPointers) {
-#if GTEST_HAS_STD_UNIQUE_PTR_
CompileAssertTypesEqual<int, PointeeOf<std::unique_ptr<int> >::type>();
-#endif // GTEST_HAS_STD_UNIQUE_PTR_
-#if GTEST_HAS_STD_SHARED_PTR_
CompileAssertTypesEqual<std::string,
PointeeOf<std::shared_ptr<std::string> >::type>();
-#endif // GTEST_HAS_STD_SHARED_PTR_
}
TEST(PointeeOfTest, WorksForRawPointers) {
@@ -139,16 +135,12 @@ TEST(PointeeOfTest, WorksForRawPointers) {
}
TEST(GetRawPointerTest, WorksForSmartPointers) {
-#if GTEST_HAS_STD_UNIQUE_PTR_
const char* const raw_p1 = new const char('a'); // NOLINT
const std::unique_ptr<const char> p1(raw_p1);
EXPECT_EQ(raw_p1, GetRawPointer(p1));
-#endif // GTEST_HAS_STD_UNIQUE_PTR_
-#if GTEST_HAS_STD_SHARED_PTR_
double* const raw_p2 = new double(2.5); // NOLINT
const std::shared_ptr<double> p2(raw_p2);
EXPECT_EQ(raw_p2, GetRawPointer(p2));
-#endif // GTEST_HAS_STD_SHARED_PTR_
}
TEST(GetRawPointerTest, WorksForRawPointers) {
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index a722187..03fa75b 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -46,6 +46,7 @@
#include <string.h>
#include <time.h>
#include <deque>
+#include <forward_list>
#include <functional>
#include <iostream>
#include <iterator>
@@ -56,20 +57,13 @@
#include <set>
#include <sstream>
#include <string>
+#include <type_traits>
#include <utility>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "gtest/gtest-spi.h"
-#if GTEST_HAS_STD_FORWARD_LIST_
-# include <forward_list> // NOLINT
-#endif
-
-#if GTEST_LANG_CXX11
-# include <type_traits>
-#endif
-
namespace testing {
namespace gmock_matchers_test {
namespace {
@@ -1189,14 +1183,12 @@ TEST(IsNullTest, MatchesNullPointer) {
#endif
}
-#if GTEST_LANG_CXX11
TEST(IsNullTest, StdFunction) {
const Matcher<std::function<void()>> m = IsNull();
EXPECT_TRUE(m.Matches(std::function<void()>()));
EXPECT_FALSE(m.Matches([]{}));
}
-#endif // GTEST_LANG_CXX11
// Tests that IsNull() describes itself properly.
TEST(IsNullTest, CanDescribeSelf) {
@@ -1237,14 +1229,12 @@ TEST(NotNullTest, ReferenceToConstLinkedPtr) {
EXPECT_TRUE(m.Matches(non_null_p));
}
-#if GTEST_LANG_CXX11
TEST(NotNullTest, StdFunction) {
const Matcher<std::function<void()>> m = NotNull();
EXPECT_TRUE(m.Matches([]{}));
EXPECT_FALSE(m.Matches(std::function<void()>()));
}
-#endif // GTEST_LANG_CXX11
// Tests that NotNull() describes itself properly.
TEST(NotNullTest, CanDescribeSelf) {
@@ -1527,7 +1517,6 @@ TEST(KeyTest, MatchesCorrectly) {
EXPECT_THAT(p, Not(Key(Lt(25))));
}
-#if GTEST_LANG_CXX11
template <size_t I>
struct Tag {};
@@ -1554,7 +1543,6 @@ TEST(PairTest, MatchesPairWithGetCorrectly) {
std::vector<PairWithGet> v = {{11, "Foo"}, {29, "gMockIsBestMock"}};
EXPECT_THAT(v, Contains(Key(29)));
}
-#endif // GTEST_LANG_CXX11
TEST(KeyTest, SafelyCastsInnerMatcher) {
Matcher<int> is_positive = Gt(0);
@@ -1699,7 +1687,6 @@ TEST(ContainsTest, WorksWithMoveOnly) {
helper.Call(MakeUniquePtrs({1, 2}));
}
-#if GTEST_LANG_CXX11
TEST(PairTest, UseGetInsteadOfMembers) {
PairWithGet pair{7, "ABC"};
EXPECT_THAT(pair, Pair(7, "ABC"));
@@ -1709,7 +1696,6 @@ TEST(PairTest, UseGetInsteadOfMembers) {
std::vector<PairWithGet> v = {{11, "Foo"}, {29, "gMockIsBestMock"}};
EXPECT_THAT(v, ElementsAre(Pair(11, string("Foo")), Pair(Ge(10), Not(""))));
}
-#endif // GTEST_LANG_CXX11
// Tests StartsWith(s).
@@ -2680,7 +2666,6 @@ static void AnyOfMatches(int num, const Matcher<int>& m) {
EXPECT_FALSE(m.Matches(num + 1));
}
-#if GTEST_LANG_CXX11
static void AnyOfStringMatches(int num, const Matcher<std::string>& m) {
SCOPED_TRACE(Describe(m));
EXPECT_FALSE(m.Matches(std::to_string(0)));
@@ -2690,7 +2675,6 @@ static void AnyOfStringMatches(int num, const Matcher<std::string>& m) {
}
EXPECT_FALSE(m.Matches(std::to_string(num + 1)));
}
-#endif
// Tests that AnyOf(m1, ..., mn) matches any value that matches at
// least one of the given matchers.
@@ -2735,7 +2719,6 @@ TEST(AnyOfTest, MatchesWhenAnyMatches) {
AnyOfMatches(10, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
}
-#if GTEST_LANG_CXX11
// Tests the variadic version of the AnyOfMatcher.
TEST(AnyOfTest, VariadicMatchesWhenAnyMatches) {
// Also make sure AnyOf is defined in the right namespace and does not depend
@@ -2784,7 +2767,6 @@ TEST(ElementsAreTest, HugeMatcherUnordered) {
Eq(3), Eq(9), Eq(12), Eq(11), Ne(122)));
}
-#endif // GTEST_LANG_CXX11
// Tests that AnyOf(m1, ..., mn) describes itself properly.
TEST(AnyOfTest, CanDescribeSelf) {
@@ -4155,9 +4137,7 @@ class AClass {
// A getter that returns a reference to const.
const std::string& s() const { return s_; }
-#if GTEST_LANG_CXX11
const std::string& s_ref() const & { return s_; }
-#endif
void set_s(const std::string& new_s) { s_ = new_s; }
@@ -4214,7 +4194,6 @@ TEST(PropertyTest, WorksForReferenceToConstProperty) {
EXPECT_FALSE(m_with_name.Matches(a));
}
-#if GTEST_LANG_CXX11
// Tests that Property(&Foo::property, ...) works when property() is
// ref-qualified.
TEST(PropertyTest, WorksForRefQualifiedProperty) {
@@ -4231,7 +4210,6 @@ TEST(PropertyTest, WorksForRefQualifiedProperty) {
EXPECT_FALSE(m.Matches(a));
EXPECT_FALSE(m_with_name.Matches(a));
}
-#endif
// Tests that Property(&Foo::property, ...) works when property()
// returns a reference to non-const.
@@ -4594,7 +4572,6 @@ TEST(ResultOfTest, WorksForPolymorphicFunctors) {
EXPECT_FALSE(matcher_string.Matches("shrt"));
}
-#if GTEST_LANG_CXX11
TEST(ResultOfTest, WorksForPolymorphicFunctorsIgnoringResultType) {
Matcher<int*> matcher = ResultOf(PolymorphicFunctor(), "good ptr");
@@ -4609,7 +4586,6 @@ TEST(ResultOfTest, WorksForLambdas) {
EXPECT_TRUE(matcher.Matches(3));
EXPECT_FALSE(matcher.Matches(1));
}
-#endif
const int* ReferencingFunction(const int& n) { return &n; }
@@ -4800,7 +4776,6 @@ TEST(IsTrueTest, IsTrueIsFalse) {
EXPECT_THAT(&a, Not(IsFalse()));
EXPECT_THAT(false, Not(IsTrue()));
EXPECT_THAT(true, Not(IsFalse()));
-#if GTEST_LANG_CXX11
EXPECT_THAT(std::true_type(), IsTrue());
EXPECT_THAT(std::true_type(), Not(IsFalse()));
EXPECT_THAT(std::false_type(), IsFalse());
@@ -4813,7 +4788,6 @@ TEST(IsTrueTest, IsTrueIsFalse) {
EXPECT_THAT(null_unique, IsFalse());
EXPECT_THAT(nonnull_unique, IsTrue());
EXPECT_THAT(nonnull_unique, Not(IsFalse()));
-#endif // GTEST_LANG_CXX11
}
TEST(SizeIsTest, ImplementsSizeIs) {
@@ -5313,7 +5287,6 @@ TEST(StreamlikeTest, Iteration) {
}
}
-#if GTEST_HAS_STD_FORWARD_LIST_
TEST(BeginEndDistanceIsTest, WorksWithForwardList) {
std::forward_list<int> container;
EXPECT_THAT(container, BeginEndDistanceIs(0));
@@ -5325,7 +5298,6 @@ TEST(BeginEndDistanceIsTest, WorksWithForwardList) {
EXPECT_THAT(container, Not(BeginEndDistanceIs(0)));
EXPECT_THAT(container, BeginEndDistanceIs(2));
}
-#endif // GTEST_HAS_STD_FORWARD_LIST_
TEST(BeginEndDistanceIsTest, WorksWithNonStdList) {
const int a[5] = {1, 2, 3, 4, 5};
@@ -5507,13 +5479,11 @@ TEST(IsSupersetOfTest, MatchAndExplain) {
" - element #2 is matched by matcher #0"));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(IsSupersetOfTest, WorksForRhsInitializerList) {
const int numbers[] = {1, 3, 6, 2, 4, 5};
EXPECT_THAT(numbers, IsSupersetOf({1, 2}));
EXPECT_THAT(numbers, Not(IsSupersetOf({3, 0})));
}
-#endif
TEST(IsSupersetOfTest, WorksWithMoveOnly) {
ContainerHelper helper;
@@ -5637,13 +5607,11 @@ TEST(IsSubsetOfTest, MatchAndExplain) {
" - element #1 is matched by matcher #2"));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(IsSubsetOfTest, WorksForRhsInitializerList) {
const int numbers[] = {1, 2, 3};
EXPECT_THAT(numbers, IsSubsetOf({1, 2, 3, 4}));
EXPECT_THAT(numbers, Not(IsSubsetOf({1, 2})));
}
-#endif
TEST(IsSubsetOfTest, WorksWithMoveOnly) {
ContainerHelper helper;
@@ -5762,7 +5730,6 @@ TEST(UnorderedElementsAreArrayTest, TakesStlContainer) {
EXPECT_THAT(actual, Not(UnorderedElementsAreArray(expected)));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(UnorderedElementsAreArrayTest, TakesInitializerList) {
const int a[5] = {2, 1, 4, 5, 3};
@@ -5796,7 +5763,6 @@ TEST(UnorderedElementsAreArrayTest,
{Eq(1), Ne(-2), Ge(3), Le(4), Eq(6)})));
}
-#endif // GTEST_HAS_STD_INITIALIZER_LIST_
TEST(UnorderedElementsAreArrayTest, WorksWithMoveOnly) {
ContainerHelper helper;
@@ -6501,7 +6467,6 @@ TEST(PointwiseTest, WorksForVectorOfBool) {
EXPECT_THAT(lhs, Not(Pointwise(Eq(), rhs)));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(PointwiseTest, WorksForRhsInitializerList) {
const vector<int> lhs{2, 4, 6};
@@ -6509,7 +6474,6 @@ TEST(PointwiseTest, WorksForRhsInitializerList) {
EXPECT_THAT(lhs, Not(Pointwise(Lt(), {3, 3, 7})));
}
-#endif // GTEST_HAS_STD_INITIALIZER_LIST_
TEST(PointwiseTest, RejectsWrongSize) {
const double lhs[2] = {1, 2};
@@ -6623,7 +6587,6 @@ TEST(UnorderedPointwiseTest, WorksForRhsNativeArray) {
EXPECT_THAT(lhs, Not(UnorderedPointwise(Lt(), rhs)));
}
-#if GTEST_HAS_STD_INITIALIZER_LIST_
TEST(UnorderedPointwiseTest, WorksForRhsInitializerList) {
const vector<int> lhs{2, 4, 6};
@@ -6631,7 +6594,6 @@ TEST(UnorderedPointwiseTest, WorksForRhsInitializerList) {
EXPECT_THAT(lhs, Not(UnorderedPointwise(Lt(), {1, 1, 7})));
}
-#endif // GTEST_HAS_STD_INITIALIZER_LIST_
TEST(UnorderedPointwiseTest, RejectsWrongSize) {
const double lhs[2] = {1, 2};
@@ -6824,7 +6786,6 @@ TEST(AnyWithTest, TestBadCastType) {
EXPECT_FALSE(m.Matches(SampleAnyType(1)));
}
-#if GTEST_LANG_CXX11
TEST(AnyWithTest, TestUseInContainers) {
std::vector<SampleAnyType> a;
a.emplace_back(1);
@@ -6841,7 +6802,6 @@ TEST(AnyWithTest, TestUseInContainers) {
AnyWith<std::string>("merhaba"),
AnyWith<std::string>("salut")}));
}
-#endif // GTEST_LANG_CXX11
TEST(AnyWithTest, TestCompare) {
EXPECT_THAT(SampleAnyType(1), AnyWith<int>(Gt(0)));
}
diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc
index d00f453..5f8f961 100644
--- a/googlemock/test/gmock-nice-strict_test.cc
+++ b/googlemock/test/gmock-nice-strict_test.cc
@@ -114,23 +114,22 @@ class MockBar {
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar);
};
-#if GTEST_GTEST_LANG_CXX11
class MockBaz {
public:
class MoveOnly {
+ public:
MoveOnly() = default;
MoveOnly(const MoveOnly&) = delete;
- operator=(const MoveOnly&) = delete;
+ MoveOnly& operator=(const MoveOnly&) = delete;
MoveOnly(MoveOnly&&) = default;
- operator=(MoveOnly&&) = default;
+ MoveOnly& operator=(MoveOnly&&) = default;
};
MockBaz(MoveOnly) {}
-}
-#endif // GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
+};
#if GTEST_HAS_STREAM_REDIRECTION
@@ -292,14 +291,10 @@ TEST(NiceMockTest, AllowLeak) {
leaked->DoThis();
}
-#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
TEST(NiceMockTest, MoveOnlyConstructor) {
- NiceMock<MockBaz> nice_baz(MockBaz::MoveOnly());
+ NiceMock<MockBaz> nice_baz(MockBaz::MoveOnly{});
}
-#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
// Tests that NiceMock<Mock> compiles where Mock is a user-defined
// class (as opposed to ::testing::Mock). We had to work around an
@@ -407,14 +402,10 @@ TEST(NaggyMockTest, AllowLeak) {
leaked->DoThis();
}
-#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
TEST(NaggyMockTest, MoveOnlyConstructor) {
- NaggyMock<MockBaz> naggy_baz(MockBaz::MoveOnly());
+ NaggyMock<MockBaz> naggy_baz(MockBaz::MoveOnly{});
}
-#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
// Tests that NaggyMock<Mock> compiles where Mock is a user-defined
// class (as opposed to ::testing::Mock). We had to work around an
@@ -503,14 +494,10 @@ TEST(StrictMockTest, AllowLeak) {
leaked->DoThis();
}
-#if GTEST_GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
TEST(StrictMockTest, MoveOnlyConstructor) {
- StrictMock<MockBaz> strict_baz(MockBaz::MoveOnly());
+ StrictMock<MockBaz> strict_baz(MockBaz::MoveOnly{});
}
-#endif // GTEST_LANG_CXX11 && GTEST_HAS_STD_MOVE_
-
#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
// Tests that StrictMock<Mock> compiles where Mock is a user-defined
// class (as opposed to ::testing::Mock). We had to work around an