Googletest export

Unifdef c++11-related macros from googletest now that it requires C++11.

PiperOrigin-RevId: 225905601
This commit is contained in:
Abseil Team
2018-12-17 18:59:00 -05:00
committed by Mark Barolak
parent 9ab640ce5e
commit e26a3fa13c
17 changed files with 30 additions and 654 deletions

View File

@@ -37,29 +37,20 @@
#include <string.h>
#include <algorithm>
#include <deque>
#include <forward_list>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "gtest/gtest-printers.h"
#include "gtest/gtest.h"
#if GTEST_HAS_UNORDERED_MAP_
# include <unordered_map> // NOLINT
#endif // GTEST_HAS_UNORDERED_MAP_
#if GTEST_HAS_UNORDERED_SET_
# include <unordered_set> // NOLINT
#endif // GTEST_HAS_UNORDERED_SET_
#if GTEST_HAS_STD_FORWARD_LIST_
# include <forward_list> // NOLINT
#endif // GTEST_HAS_STD_FORWARD_LIST_
// Some user-defined types for testing the universal value printer.
// An anonymous enum type.
@@ -814,7 +805,6 @@ TEST(PrintStlContainerTest, NonEmptyDeque) {
EXPECT_EQ("{ 1, 3 }", Print(non_empty));
}
#if GTEST_HAS_UNORDERED_MAP_
TEST(PrintStlContainerTest, OneElementHashMap) {
::std::unordered_map<int, char> map1;
@@ -834,9 +824,7 @@ TEST(PrintStlContainerTest, HashMultiMap) {
<< " where Print(map1) returns \"" << result << "\".";
}
#endif // GTEST_HAS_UNORDERED_MAP_
#if GTEST_HAS_UNORDERED_SET_
TEST(PrintStlContainerTest, HashSet) {
::std::unordered_set<int> set1;
@@ -873,7 +861,6 @@ TEST(PrintStlContainerTest, HashMultiSet) {
EXPECT_TRUE(std::equal(a, a + kSize, numbers.begin()));
}
#endif // GTEST_HAS_UNORDERED_SET_
TEST(PrintStlContainerTest, List) {
const std::string a[] = {"hello", "world"};
@@ -915,14 +902,12 @@ TEST(PrintStlContainerTest, MultiSet) {
EXPECT_EQ("{ 1, 1, 1, 2, 5 }", Print(set1));
}
#if GTEST_HAS_STD_FORWARD_LIST_
TEST(PrintStlContainerTest, SinglyLinkedList) {
int a[] = { 9, 2, 8 };
const std::forward_list<int> ints(a, a + 3);
EXPECT_EQ("{ 9, 2, 8 }", Print(ints));
}
#endif // GTEST_HAS_STD_FORWARD_LIST_
TEST(PrintStlContainerTest, Pair) {
pair<const bool, int> p(true, 5);