Merge branch 'master' into master

This commit is contained in:
Jonny007-MKD
2018-09-14 22:39:45 +02:00
committed by GitHub
4 changed files with 31 additions and 44 deletions

View File

@@ -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"
@@ -5165,8 +5163,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 {
@@ -5179,8 +5176,6 @@ TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) {
EXPECT_TRUE(v2);
}
#endif // GTEST_LANG_CXX11
struct ConvertibleToAssertionResult {
operator AssertionResult() const { return AssertionResult(true); }
};
@@ -7564,7 +7559,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;
@@ -7586,7 +7580,6 @@ TEST(IsContainerTestTest, ConstOnlyContainer) {
EXPECT_EQ(sizeof(IsContainer),
sizeof(IsContainerTest<ConstOnlyContainerWithClassIterator>(0)));
}
#endif // GTEST_LANG_CXX11
// Tests IsHashTable.
struct AHashTable {
@@ -7599,10 +7592,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_