summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-09-14 19:54:01 (GMT)
committerGitHub <noreply@github.com>2018-09-14 19:54:01 (GMT)
commitbc2d0935b74917be0821bfd834472ed9cc4a3b5b (patch)
tree625b927fbb247f69887e6e4591287fe3b4b126ae
parent28c2989eeaa33f5642213ad884b9b9251a8b3875 (diff)
parentfc2caf6485f7065787f081765c0282837323960b (diff)
downloadgoogletest-bc2d0935b74917be0821bfd834472ed9cc4a3b5b.zip
googletest-bc2d0935b74917be0821bfd834472ed9cc4a3b5b.tar.gz
googletest-bc2d0935b74917be0821bfd834472ed9cc4a3b5b.tar.bz2
Merge pull request #1838 from google/9A681768AABE08D1EFA5CA77528236A4
Googletest export
-rw-r--r--.travis.yml11
-rw-r--r--googletest/test/gtest_unittest.cc11
2 files changed, 1 insertions, 21 deletions
diff --git a/.travis.yml b/.travis.yml
index 4e7413a..4ec239f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,25 +32,14 @@ matrix:
- os: linux
group: deprecated-2017Q4
compiler: clang
- env: BUILD_TYPE=Debug VERBOSE=1
- - os: linux
- group: deprecated-2017Q4
- compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
- os: linux
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
- os: osx
compiler: gcc
- env: BUILD_TYPE=Debug VERBOSE=1
- - os: osx
- compiler: gcc
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
- os: osx
- compiler: clang
- env: BUILD_TYPE=Debug VERBOSE=1
- if: type != pull_request
- - os: osx
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if: type != pull_request
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index fa10224..701ba20 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -63,9 +63,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
#include <map>
#include <vector>
#include <ostream>
-#if GTEST_LANG_CXX11
#include <unordered_set>
-#endif // GTEST_LANG_CXX11
#include "gtest/gtest-spi.h"
#include "src/gtest-internal-inl.h"
@@ -5156,8 +5154,7 @@ TEST(AssertionResultTest, CanStreamOstreamManipulators) {
EXPECT_STREQ("Data\n\\0Will be visible", r.message());
}
-// The next test uses explicit conversion operators -- a C++11 feature.
-#if GTEST_LANG_CXX11
+// The next test uses explicit conversion operators
TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) {
struct ExplicitlyConvertibleToBool {
@@ -5170,8 +5167,6 @@ TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) {
EXPECT_TRUE(v2);
}
-#endif // GTEST_LANG_CXX11
-
struct ConvertibleToAssertionResult {
operator AssertionResult() const { return AssertionResult(true); }
};
@@ -7555,7 +7550,6 @@ TEST(IsContainerTestTest, WorksForContainer) {
sizeof(IsContainerTest<std::map<int, double> >(0)));
}
-#if GTEST_LANG_CXX11
struct ConstOnlyContainerWithPointerIterator {
using const_iterator = int*;
const_iterator begin() const;
@@ -7577,7 +7571,6 @@ TEST(IsContainerTestTest, ConstOnlyContainer) {
EXPECT_EQ(sizeof(IsContainer),
sizeof(IsContainerTest<ConstOnlyContainerWithClassIterator>(0)));
}
-#endif // GTEST_LANG_CXX11
// Tests IsHashTable.
struct AHashTable {
@@ -7590,10 +7583,8 @@ struct NotReallyAHashTable {
TEST(IsHashTable, Basic) {
EXPECT_TRUE(testing::internal::IsHashTable<AHashTable>::value);
EXPECT_FALSE(testing::internal::IsHashTable<NotReallyAHashTable>::value);
-#if GTEST_LANG_CXX11
EXPECT_FALSE(testing::internal::IsHashTable<std::vector<int>>::value);
EXPECT_TRUE(testing::internal::IsHashTable<std::unordered_set<int>>::value);
-#endif // GTEST_LANG_CXX11
#if GTEST_HAS_HASH_SET_
EXPECT_TRUE(testing::internal::IsHashTable<__gnu_cxx::hash_set<int>>::value);
#endif // GTEST_HAS_HASH_SET_