diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-03-21 19:17:34 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-03-22 18:10:08 +0300 |
commit | 161393805f606089959f04b7656bd33b9b91311f (patch) | |
tree | 945863eb60b5a4702204cd065d4bf0fcf489b392 /extern/gtest/include | |
parent | cfe43f8d1af2183a115414abd56a899d116be27d (diff) |
Update Google libraries
This commit updates:
- gflags 2.2.0 -> 2.2.1
- glog 0.3.4 -> 0.3.4
- gmock 1.7.0 -> 1.8.0
- gtest 1.7.0 -> 1.8.0
Diffstat (limited to 'extern/gtest/include')
-rw-r--r-- | extern/gtest/include/gtest/gtest-printers.h | 8 | ||||
-rw-r--r-- | extern/gtest/include/gtest/gtest.h | 18 | ||||
-rw-r--r-- | extern/gtest/include/gtest/internal/gtest-internal.h | 8 | ||||
-rw-r--r-- | extern/gtest/include/gtest/internal/gtest-port.h | 57 |
4 files changed, 25 insertions, 66 deletions
diff --git a/extern/gtest/include/gtest/gtest-printers.h b/extern/gtest/include/gtest/gtest-printers.h index 27a1edc3728..8a33164cb38 100644 --- a/extern/gtest/include/gtest/gtest-printers.h +++ b/extern/gtest/include/gtest/gtest-printers.h @@ -103,7 +103,7 @@ #include "gtest/internal/gtest-port.h" #include "gtest/internal/gtest-internal.h" -#if defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_ +#if GTEST_HAS_STD_TUPLE_ # include <tuple> #endif @@ -581,7 +581,7 @@ inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { } #endif // GTEST_HAS_STD_WSTRING -#if GTEST_HAS_TR1_TUPLE || (defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_) +#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_ // Helper function for printing a tuple. T must be instantiated with // a tuple type. template <typename T> @@ -664,7 +664,7 @@ void PrintTo( } #endif // GTEST_HAS_TR1_TUPLE -#if defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_ +#if GTEST_HAS_STD_TUPLE_ template <typename... Types> void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) { PrintTupleTo(t, os); @@ -888,7 +888,7 @@ template <typename TupleT> const size_t TuplePolicy<TupleT>::tuple_size; #endif // GTEST_HAS_TR1_TUPLE -#if defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_ +#if GTEST_HAS_STD_TUPLE_ template <typename... Types> struct TuplePolicy< ::std::tuple<Types...> > { typedef ::std::tuple<Types...> Tuple; diff --git a/extern/gtest/include/gtest/gtest.h b/extern/gtest/include/gtest/gtest.h index 18d3ed4b469..f846c5bd669 100644 --- a/extern/gtest/include/gtest/gtest.h +++ b/extern/gtest/include/gtest/gtest.h @@ -1818,7 +1818,7 @@ class TestWithParam : public Test, public WithParamInterface<T> { // Define this macro to 1 to omit the definition of FAIL(), which is a // generic name and clashes with some other libraries. -#if !defined(GTEST_DONT_DEFINE_FAIL) || !GTEST_DONT_DEFINE_FAIL +#if !GTEST_DONT_DEFINE_FAIL # define FAIL() GTEST_FAIL() #endif @@ -1827,7 +1827,7 @@ class TestWithParam : public Test, public WithParamInterface<T> { // Define this macro to 1 to omit the definition of SUCCEED(), which // is a generic name and clashes with some other libraries. -#if !defined(GTEST_DONT_DEFINE_SUCCEED) || !GTEST_DONT_DEFINE_SUCCEED +#if !GTEST_DONT_DEFINE_SUCCEED # define SUCCEED() GTEST_SUCCEED() #endif @@ -1952,27 +1952,27 @@ class TestWithParam : public Test, public WithParamInterface<T> { // Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of // ASSERT_XY(), which clashes with some users' own code. -#if !defined(GTEST_DONT_DEFINE_ASSERT_EQ) || !GTEST_DONT_DEFINE_ASSERT_EQ +#if !GTEST_DONT_DEFINE_ASSERT_EQ # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) #endif -#if !defined(GTEST_DONT_DEFINE_ASSERT_NE) || !GTEST_DONT_DEFINE_ASSERT_NE +#if !GTEST_DONT_DEFINE_ASSERT_NE # define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2) #endif -#if !defined(GTEST_DONT_DEFINE_ASSERT_LE) || !GTEST_DONT_DEFINE_ASSERT_LE +#if !GTEST_DONT_DEFINE_ASSERT_LE # define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2) #endif -#if !defined(GTEST_DONT_DEFINE_ASSERT_LT) || !GTEST_DONT_DEFINE_ASSERT_LT +#if !GTEST_DONT_DEFINE_ASSERT_LT # define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2) #endif -#if !defined(GTEST_DONT_DEFINE_ASSERT_GE) || !GTEST_DONT_DEFINE_ASSERT_GE +#if !GTEST_DONT_DEFINE_ASSERT_GE # define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2) #endif -#if !defined(GTEST_DONT_DEFINE_ASSERT_GT) || !GTEST_DONT_DEFINE_ASSERT_GT +#if !GTEST_DONT_DEFINE_ASSERT_GT # define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2) #endif @@ -2183,7 +2183,7 @@ bool StaticAssertTypeEq() { // Define this macro to 1 to omit the definition of TEST(), which // is a generic name and clashes with some other libraries. -#if !defined(GTEST_DONT_DEFINE_TEST) || !GTEST_DONT_DEFINE_TEST +#if !GTEST_DONT_DEFINE_TEST # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name) #endif diff --git a/extern/gtest/include/gtest/internal/gtest-internal.h b/extern/gtest/include/gtest/internal/gtest-internal.h index ca15a2f3a78..ebd1cf615de 100644 --- a/extern/gtest/include/gtest/internal/gtest-internal.h +++ b/extern/gtest/include/gtest/internal/gtest-internal.h @@ -60,10 +60,6 @@ #include <string> #include <vector> -#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) -# include <type_traits> -#endif - #include "gtest/gtest-message.h" #include "gtest/internal/gtest-string.h" #include "gtest/internal/gtest-filepath.h" @@ -858,7 +854,6 @@ struct AddReference<T&> { typedef T& type; }; // NOLINT template <typename From, typename To> class ImplicitlyConvertible { private: -#if !((__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)) // We need the following helper functions only for their types. // They have no implementations. @@ -879,7 +874,6 @@ class ImplicitlyConvertible { // implicitly converted to type To. static char Helper(To); static char (&Helper(...))[2]; // NOLINT -#endif // We have to put the 'public' section after the 'private' section, // or MSVC refuses to compile the code. @@ -889,8 +883,6 @@ class ImplicitlyConvertible { // instantiation. The simplest workaround is to use its C++0x type traits // functions (C++Builder 2009 and above only). static const bool value = __is_convertible(From, To); -#elif (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) - static const bool value = std::is_convertible<From, To>::value; #else // MSVC warns about implicitly converting from double to int for // possible loss of data, so we need to temporarily disable the diff --git a/extern/gtest/include/gtest/internal/gtest-port.h b/extern/gtest/include/gtest/internal/gtest-port.h index ad2a43df17d..0094ed5077e 100644 --- a/extern/gtest/include/gtest/internal/gtest-port.h +++ b/extern/gtest/include/gtest/internal/gtest-port.h @@ -306,7 +306,7 @@ // GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385) // /* code that triggers warnings C4800 and C4385 */ // GTEST_DISABLE_MSC_WARNINGS_POP_() -#if defined(_MSC_VER) && _MSC_VER >= 1500 +#if _MSC_VER >= 1500 # define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \ __pragma(warning(push)) \ __pragma(warning(disable: warnings)) @@ -323,7 +323,7 @@ // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a // value for __cplusplus, and recent versions of clang, gcc, and // probably other compilers set that too in C++11 mode. -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L // Compiling in at least C++11 mode. # define GTEST_LANG_CXX11 1 # else @@ -352,7 +352,7 @@ #endif // Only use C++11 library features if the library provides them. -#if defined(GTEST_STDLIB_CXX11) && GTEST_STDLIB_CXX11 +#if GTEST_STDLIB_CXX11 # define GTEST_HAS_STD_BEGIN_AND_END_ 1 # define GTEST_HAS_STD_FORWARD_LIST_ 1 # define GTEST_HAS_STD_FUNCTION_ 1 @@ -387,37 +387,6 @@ # endif #endif -#ifndef GTEST_OS_WINDOWS -# define GTEST_OS_WINDOWS 0 -#endif -#ifndef GTEST_OS_WINDOWS_MINGW -# define GTEST_OS_WINDOWS_MINGW 0 -#endif -#ifndef GTEST_OS_WINDOWS_PHONE -# define GTEST_OS_WINDOWS_PHONE 0 -#endif -#ifndef GTEST_OS_WINDOWS_MOBILE -# define GTEST_OS_WINDOWS_MOBILE 0 -#endif -#ifndef GTEST_OS_WINDOWS_RT -# define GTEST_OS_WINDOWS_RT 0 -#endif -#ifndef GTEST_OS_LINUX_ANDROID -# define GTEST_OS_LINUX_ANDROID 0 -#endif -#ifndef GTEST_OS_QNX -# define GTEST_OS_QNX 0 -#endif -#ifndef GTEST_OS_SYMBIAN -# define GTEST_OS_SYMBIAN 0 -#endif -#ifndef GTEST_OS_CYGWIN -# define GTEST_OS_CYGWIN 0 -#endif -#ifndef GTEST_OS_SOLARIS -# define GTEST_OS_SOLARIS 0 -#endif - // Brings in definitions for functions used in the testing::internal::posix // namespace (read, write, close, chdir, isatty, stat). We do not currently // use them on Windows Mobile. @@ -454,7 +423,7 @@ struct _RTL_CRITICAL_SECTION; # endif #endif -#if defined(GTEST_USES_PCRE) && GTEST_USES_PCRE +#if GTEST_USES_PCRE // The appropriate headers have already been included. #elif GTEST_HAS_POSIX_RE @@ -647,7 +616,7 @@ struct _RTL_CRITICAL_SECTION; // Determines if hash_map/hash_set are available. // Only used for testing against those containers. #if !defined(GTEST_HAS_HASH_MAP_) -# if defined(_MSC_VER) +# if _MSC_VER # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available. # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available. # endif // _MSC_VER @@ -691,8 +660,6 @@ struct _RTL_CRITICAL_SECTION; // can build with clang but need to use gcc4.2's libstdc++). # if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) # define GTEST_ENV_HAS_STD_TUPLE_ 1 -# else -# define GTEST_ENV_HAS_STD_TUPLE_ 0 # endif # if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_ @@ -706,7 +673,7 @@ struct _RTL_CRITICAL_SECTION; // To avoid conditional compilation everywhere, we make it // gtest-port.h's responsibility to #include the header implementing // tuple. -#if defined(GTEST_HAS_STD_TUPLE_) && GTEST_HAS_STD_TUPLE_ +#if GTEST_HAS_STD_TUPLE_ # include <tuple> // IWYU pragma: export # define GTEST_TUPLE_NAMESPACE_ ::std #endif // GTEST_HAS_STD_TUPLE_ @@ -947,7 +914,7 @@ using ::std::tuple_size; # endif #define GTEST_IS_THREADSAFE \ - ((defined(GTEST_HAS_MUTEX_AND_THREAD_LOCAL_) && GTEST_HAS_MUTEX_AND_THREAD_LOCAL_) \ + (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ \ || (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) \ || GTEST_HAS_PTHREAD) @@ -1343,7 +1310,7 @@ inline void FlushInfoLog() { fflush(NULL); } GTEST_LOG_(FATAL) << #posix_call << "failed with error " \ << gtest_error -#if defined(GTEST_HAS_STD_MOVE_) && GTEST_HAS_STD_MOVE_ +#if GTEST_HAS_STD_MOVE_ using std::move; #else // GTEST_HAS_STD_MOVE_ template <typename T> @@ -1427,7 +1394,7 @@ Derived* CheckedDowncastToActualType(Base* base) { GTEST_CHECK_(typeid(*base) == typeid(Derived)); #endif -#if defined(GTEST_HAS_DOWNCAST_) && GTEST_HAS_DOWNCAST_ +#if GTEST_HAS_DOWNCAST_ return ::down_cast<Derived*>(base); #elif GTEST_HAS_RTTI return dynamic_cast<Derived*>(base); // NOLINT @@ -1487,7 +1454,7 @@ inline void SleepMilliseconds(int n) { } # endif // GTEST_HAS_PTHREAD -# if defined(GTEST_HAS_NOTIFICATION_) && GTEST_HAS_NOTIFICATION_ +# if GTEST_HAS_NOTIFICATION_ // Notification has already been imported into the namespace. // Nothing to do here. @@ -1670,7 +1637,7 @@ class ThreadWithParam : public ThreadWithParamBase { # endif // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD || // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ -# if defined(GTEST_HAS_MUTEX_AND_THREAD_LOCAL_) && GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ +# if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ // Mutex and ThreadLocal have already been imported into the namespace. // Nothing to do here. @@ -2450,7 +2417,7 @@ inline void Abort() { abort(); } // MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate // function in order to achieve that. We use macro definition here because // snprintf is a variadic function. -#if defined(_MSC_VER) && _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE +#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE // MSVC 2005 and above support variadic macros. # define GTEST_SNPRINTF_(buffer, size, format, ...) \ _snprintf_s(buffer, size, size, format, __VA_ARGS__) |