More merges, removing old dead code
This commit is contained in:
		@@ -46,9 +46,10 @@
 | 
			
		||||
#include "gmock/internal/gmock-internal-utils.h"
 | 
			
		||||
#include "gmock/internal/gmock-port.h"
 | 
			
		||||
 | 
			
		||||
#if GTEST_HAS_STD_TYPE_TRAITS_  // Defined by gtest-port.h via gmock-port.h.
 | 
			
		||||
#if GTEST_LANG_CXX11  // Defined by gtest-port.h via gmock-port.h.
 | 
			
		||||
#include <functional>
 | 
			
		||||
#include <type_traits>
 | 
			
		||||
#endif
 | 
			
		||||
#endif  // GTEST_LANG_CXX11
 | 
			
		||||
 | 
			
		||||
namespace testing {
 | 
			
		||||
 | 
			
		||||
@@ -96,7 +97,7 @@ struct BuiltInDefaultValueGetter<T, false> {
 | 
			
		||||
template <typename T>
 | 
			
		||||
class BuiltInDefaultValue {
 | 
			
		||||
 public:
 | 
			
		||||
#if GTEST_HAS_STD_TYPE_TRAITS_
 | 
			
		||||
#if GTEST_LANG_CXX11
 | 
			
		||||
  // This function returns true iff type T has a built-in default value.
 | 
			
		||||
  static bool Exists() {
 | 
			
		||||
    return ::std::is_default_constructible<T>::value;
 | 
			
		||||
@@ -107,7 +108,7 @@ class BuiltInDefaultValue {
 | 
			
		||||
        T, ::std::is_default_constructible<T>::value>::Get();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#else  // GTEST_HAS_STD_TYPE_TRAITS_
 | 
			
		||||
#else  // GTEST_LANG_CXX11
 | 
			
		||||
  // This function returns true iff type T has a built-in default value.
 | 
			
		||||
  static bool Exists() {
 | 
			
		||||
    return false;
 | 
			
		||||
@@ -117,7 +118,7 @@ class BuiltInDefaultValue {
 | 
			
		||||
    return BuiltInDefaultValueGetter<T, false>::Get();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#endif  // GTEST_HAS_STD_TYPE_TRAITS_
 | 
			
		||||
#endif  // GTEST_LANG_CXX11
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// This partial specialization says that we use the same built-in
 | 
			
		||||
 
 | 
			
		||||
@@ -218,7 +218,7 @@ class MyNonDefaultConstructible {
 | 
			
		||||
  int value_;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if GTEST_HAS_STD_TYPE_TRAITS_
 | 
			
		||||
#if GTEST_LANG_CXX11
 | 
			
		||||
 | 
			
		||||
TEST(BuiltInDefaultValueTest, ExistsForDefaultConstructibleType) {
 | 
			
		||||
  EXPECT_TRUE(BuiltInDefaultValue<MyDefaultConstructible>::Exists());
 | 
			
		||||
@@ -228,7 +228,7 @@ TEST(BuiltInDefaultValueTest, IsDefaultConstructedForDefaultConstructibleType) {
 | 
			
		||||
  EXPECT_EQ(42, BuiltInDefaultValue<MyDefaultConstructible>::Get().value());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif  // GTEST_HAS_STD_TYPE_TRAITS_
 | 
			
		||||
#endif  // GTEST_LANG_CXX11
 | 
			
		||||
 | 
			
		||||
TEST(BuiltInDefaultValueTest, DoesNotExistForNonDefaultConstructibleType) {
 | 
			
		||||
  EXPECT_FALSE(BuiltInDefaultValue<MyNonDefaultConstructible>::Exists());
 | 
			
		||||
 
 | 
			
		||||
@@ -363,16 +363,14 @@
 | 
			
		||||
#if GTEST_STDLIB_CXX11
 | 
			
		||||
# define GTEST_HAS_STD_BEGIN_AND_END_ 1
 | 
			
		||||
# define GTEST_HAS_STD_FORWARD_LIST_ 1
 | 
			
		||||
# if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824) // works only with VS2015U2 and better
 | 
			
		||||
# if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824)
 | 
			
		||||
// works only with VS2015U2 and better
 | 
			
		||||
#   define GTEST_HAS_STD_FUNCTION_ 1
 | 
			
		||||
# endif
 | 
			
		||||
# define GTEST_HAS_STD_INITIALIZER_LIST_ 1
 | 
			
		||||
# define GTEST_HAS_STD_MOVE_ 1
 | 
			
		||||
# define GTEST_HAS_STD_SHARED_PTR_ 1
 | 
			
		||||
# define GTEST_HAS_STD_TYPE_TRAITS_ 1
 | 
			
		||||
# define GTEST_HAS_STD_UNIQUE_PTR_ 1
 | 
			
		||||
# define GTEST_HAS_UNORDERED_MAP_ 1
 | 
			
		||||
# define GTEST_HAS_UNORDERED_SET_ 1
 | 
			
		||||
# define GTEST_HAS_STD_SHARED_PTR_ 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// C++11 specifies that <tuple> provides std::tuple.
 | 
			
		||||
@@ -982,13 +980,13 @@ using ::std::tuple_size;
 | 
			
		||||
# endif
 | 
			
		||||
#elif __GNUC__ >= 4 || defined(__clang__)
 | 
			
		||||
# define GTEST_API_ __attribute__((visibility ("default")))
 | 
			
		||||
#endif // _MSC_VER
 | 
			
		||||
#endif  // _MSC_VER
 | 
			
		||||
 | 
			
		||||
#endif // GTEST_API_
 | 
			
		||||
#endif  // GTEST_API_
 | 
			
		||||
 | 
			
		||||
#ifndef GTEST_API_
 | 
			
		||||
# define GTEST_API_
 | 
			
		||||
#endif // GTEST_API_
 | 
			
		||||
#endif  // GTEST_API_
 | 
			
		||||
 | 
			
		||||
#ifndef GTEST_DEFAULT_DEATH_TEST_STYLE
 | 
			
		||||
# define GTEST_DEFAULT_DEATH_TEST_STYLE  "fast"
 | 
			
		||||
 
 | 
			
		||||
@@ -50,19 +50,6 @@
 | 
			
		||||
 | 
			
		||||
#include "gtest/gtest.h"
 | 
			
		||||
 | 
			
		||||
// hash_map and hash_set are available under Visual C++, or on Linux.
 | 
			
		||||
#if GTEST_HAS_UNORDERED_MAP_
 | 
			
		||||
# include <unordered_map>  // NOLINT
 | 
			
		||||
#elif GTEST_HAS_HASH_MAP_
 | 
			
		||||
# include <hash_map>            // NOLINT
 | 
			
		||||
#endif  // GTEST_HAS_HASH_MAP_
 | 
			
		||||
 | 
			
		||||
#if GTEST_HAS_UNORDERED_SET_
 | 
			
		||||
# include <unordered_set>  // NOLINT
 | 
			
		||||
#elif GTEST_HAS_HASH_SET_
 | 
			
		||||
# include <hash_set>            // NOLINT
 | 
			
		||||
#endif  // GTEST_HAS_HASH_SET_
 | 
			
		||||
 | 
			
		||||
#if GTEST_HAS_STD_FORWARD_LIST_
 | 
			
		||||
# include <forward_list> // NOLINT
 | 
			
		||||
#endif  // GTEST_HAS_STD_FORWARD_LIST_
 | 
			
		||||
@@ -240,50 +227,6 @@ using ::testing::internal::UniversalTersePrint;
 | 
			
		||||
using ::testing::internal::UniversalTersePrintTupleFieldsToStrings;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// The hash_* classes are not part of the C++ standard.  STLport
 | 
			
		||||
// defines them in namespace std.  MSVC defines them in ::stdext.  GCC
 | 
			
		||||
// defines them in ::.
 | 
			
		||||
#if GTEST_HAS_UNORDERED_MAP_
 | 
			
		||||
 | 
			
		||||
#define GTEST_HAS_HASH_MAP_ 1
 | 
			
		||||
template <class Key, class T>
 | 
			
		||||
using hash_map = ::std::unordered_map<Key, T>;
 | 
			
		||||
template <class Key, class T>
 | 
			
		||||
using hash_multimap = ::std::unordered_multimap<Key, T>;
 | 
			
		||||
 | 
			
		||||
#elif GTEST_HAS_HASH_MAP_
 | 
			
		||||
 | 
			
		||||
#ifdef _STLP_HASH_MAP  // We got <hash_map> from STLport.
 | 
			
		||||
using ::std::hash_map;
 | 
			
		||||
using ::std::hash_multimap;
 | 
			
		||||
#elif _MSC_VER
 | 
			
		||||
using ::stdext::hash_map;
 | 
			
		||||
using ::stdext::hash_multimap;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if GTEST_HAS_UNORDERED_SET_
 | 
			
		||||
 | 
			
		||||
#define GTEST_HAS_HASH_SET_ 1
 | 
			
		||||
template <class Key>
 | 
			
		||||
using hash_set = ::std::unordered_set<Key>;
 | 
			
		||||
template <class Key>
 | 
			
		||||
using hash_multiset = ::std::unordered_multiset<Key>;
 | 
			
		||||
 | 
			
		||||
#elif GTEST_HAS_HASH_SET_
 | 
			
		||||
 | 
			
		||||
#ifdef _STLP_HASH_MAP  // We got <hash_map> from STLport.
 | 
			
		||||
using ::std::hash_map;
 | 
			
		||||
using ::std::hash_multimap;
 | 
			
		||||
#elif _MSC_VER
 | 
			
		||||
using ::stdext::hash_map;
 | 
			
		||||
using ::stdext::hash_multimap;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Prints a value to a string using the universal value printer.  This
 | 
			
		||||
// is a helper for testing UniversalPrinter<T>::Print() for various types.
 | 
			
		||||
template <typename T>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user