diff options
author | Dan Kegel <dank@kegel.com> | 2017-03-02 00:44:47 (GMT) |
---|---|---|
committer | Dan Kegel <dank@kegel.com> | 2017-03-02 02:40:48 (GMT) |
commit | 518e0519ca49c3a6504d1e377c5a467434d5f719 (patch) | |
tree | 8bd27131e094d7c137a4789199dd81d9ef008c8d /googletest/test | |
parent | aa148eb2b7f70ede0eb10de34b6254826bfb34f4 (diff) | |
download | googletest-518e0519ca49c3a6504d1e377c5a467434d5f719.zip googletest-518e0519ca49c3a6504d1e377c5a467434d5f719.tar.gz googletest-518e0519ca49c3a6504d1e377c5a467434d5f719.tar.bz2 |
Minimal changes to fix build failures on Microsoft Visual Studio 2015refs/pull/1034/head
Fixes the following errors:
hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj]
hash_set(17): error C2338: <hash_set> is deprecated and will be REMOVED. Please use <unordered_set>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj]
googletest\test\gtest_catch_exceptions_test_.cc(152): error C2220: warning treated as error - no 'object' file generated
googletest\test\gtest_catch_exceptions_test_.cc(152): warning C4297: 'CxxExceptionInDestructorTest::~CxxExceptionInDestructorTest': function assumed not to throw an exception but does
googletest\test\gtest_catch_exceptions_test_.cc(152): note: destructor or deallocator has a (possibly implicit) non-throwing exception specification
There were already some checks for _MSC_VER in the code, so this commit
continues in that vein.
Diffstat (limited to 'googletest/test')
-rw-r--r-- | googletest/test/gtest-printers_test.cc | 2 | ||||
-rw-r--r-- | googletest/test/gtest_catch_exceptions_test_.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/gtest-printers_test.cc index af69f28..107b10f 100644 --- a/googletest/test/gtest-printers_test.cc +++ b/googletest/test/gtest-printers_test.cc @@ -216,6 +216,7 @@ using ::testing::internal::UniversalTersePrintTupleFieldsToStrings; #endif using ::testing::internal::string; +#if GTEST_HAS_HASH_MAP_ // 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 ::. @@ -230,6 +231,7 @@ using ::stdext::hash_set; using ::stdext::hash_multimap; using ::stdext::hash_multiset; #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. diff --git a/googletest/test/gtest_catch_exceptions_test_.cc b/googletest/test/gtest_catch_exceptions_test_.cc index d0fc82c..b42637e 100644 --- a/googletest/test/gtest_catch_exceptions_test_.cc +++ b/googletest/test/gtest_catch_exceptions_test_.cc @@ -138,7 +138,7 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) { } // Exceptions in destructors are not supported in C++11. -#if !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L +#if !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L && _MSC_VER < 1900 class CxxExceptionInDestructorTest : public Test { public: static void TearDownTestCase() { |