33 #include <type_traits>
39 TEST(SparseArray, Basic) {
74 TEST(SparseArray, Limits) {
82 std::vector<std::pair<uint32_t, int>> present;
83 for (
const auto& cur :
map) {
84 present.push_back(cur);
90 TEST(SparseArray, Iterator) {
93 std::set<std::pair<int, int>> should;
94 should.insert(std::make_pair(14, 4));
95 should.insert(std::make_pair(0, 1));
96 should.insert(std::make_pair(4, 2));
97 should.insert(std::make_pair(38, 5));
98 should.insert(std::make_pair(12, 3));
99 should.insert(std::make_pair(120, 6));
101 for (
const auto& cur : should) {
102 map.update(cur.first, cur.second);
105 std::set<std::pair<int, int>> is;
106 for (
const auto& cur :
map) {
113 TEST(SparseArray, IteratorStress) {
114 const static int N = 10000;
116 SparseArray<int>
map;
118 std::vector<int> pos;
119 while (pos.size() < N) {
120 int n = random() % (N * 10);
126 std::set<std::pair<int, int>> should;
127 for (
int i = 0;
i < N;
i++) {
128 should.insert(std::make_pair(pos[
i],
i + 1));
131 for (
const auto& cur : should) {
132 map.update(cur.first, cur.second);
136 std::set<std::pair<int, int>> is;
137 for (
const auto& cur :
map) {
144 TEST(SparseArray, IteratorStress2) {
145 const static int N = 1000;
149 for (
unsigned j = 0;
j < N;
j++) {
152 if (log) std::cout <<
"Creating " <<
j <<
" random numbers ..\n";
153 std::vector<int> pos;
154 while (pos.size() <
j) {
155 int n = random() % (N * 10);
161 if (log) std::cout <<
"Creating input list ..\n";
162 std::set<std::pair<int, int>> should;
163 for (
unsigned i = 0;
i <
j;
i++) {
164 should.insert(std::make_pair(pos[
i],
i + 1));
167 if (log) std::cout <<
"Filling in input list ..\n";
168 for (
const auto& cur : should) {
169 map.update(cur.first, cur.second);
173 if (log) std::cout <<
"Sort should list ..\n";
175 if (log) std::cout <<
"Collect is list ..\n";
176 std::set<std::pair<int, int>> is;
178 for (
const auto& cur :
map) {
184 if (log) std::cout <<
"Comparing lists ..\n";
186 if (log) std::cout <<
"Done\n\n";
190 TEST(SparseArray, Find) {
191 SparseArray<int>
map;
214 auto it =
map.find(12);
220 TEST(SparseArray, Find2) {
240 TEST(SparseArray, Copy) {
268 TEST(SparseArray, Merge) {
279 std::vector<std::pair<int, int>>
data;
280 for (
const auto& it : m1) {
286 TEST(SparseArray, LowerBound) {
334 TEST(SparseArray, LowerBound2) {
335 for (uint32_t
m = 0;
m < 256; ++
m) {
336 SparseArray<uint32_t> a;
337 std::set<uint32_t> r;
339 for (uint32_t
i = 0;
i < 8;
i++) {
340 if (!(
m & (1 <<
i))) {
343 a.update(
i * 100, 10);
347 for (uint32_t
i = 0;
i < 10;
i++) {
348 auto a_res = a.lowerBound(
i * 100);
349 auto r_res = r.lower_bound(
i * 100);
351 EXPECT_EQ(a_res == a.end(), r_res == r.end()) <<
"\nm=" << std::bitset<8>(
m) <<
"\ni=" <<
i;
353 if (a_res == a.end()) {
357 EXPECT_EQ(a_res->first, *r_res) <<
"\nm=" << std::bitset<8>(
m) <<
"\ni=" <<
i;
362 TEST(SparseArray, UpperBound) {
414 TEST(SparseArray, UpperBound2) {
415 for (uint32_t
m = 0;
m < 256; ++
m) {
416 SparseArray<uint32_t> a;
417 std::set<uint32_t> r;
419 for (uint32_t
i = 0;
i < 8;
i++) {
420 if (!(
m & (1 <<
i))) {
423 a.update(
i * 100, 10);
427 for (uint32_t
i = 0;
i < 10;
i++) {
428 auto a_res = a.upperBound(
i * 100);
429 auto r_res = r.upper_bound(
i * 100);
431 EXPECT_EQ(a_res == a.end(), r_res == r.end()) <<
"\nm=" << std::bitset<8>(
m) <<
"\ni=" <<
i;
433 if (a_res == a.end()) {
437 EXPECT_EQ(a_res->first, *r_res) <<
"\nm=" << std::bitset<8>(
m) <<
"\ni=" <<
i;
442 TEST(SparseArray, MemoryUsage) {
443 if (
sizeof(
void*) > 4) {
482 TEST(SparseBitMap, Basic) {
485 EXPECT_EQ(
sizeof(std::bitset<
sizeof(
void*) * 8>),
sizeof(
void*));
510 TEST(SparseBitMap, Stress) {
511 const static int N = 10000;
515 std::vector<int> should;
516 while (should.size() < N) {
517 int n = random() % (N * 10);
523 for (
const auto& cur : should) {
529 for (
int i = 0;
i < N * 10;
i++) {
534 TEST(SparseBitMap, Iterator) {
538 for (
const auto& cur :
map) {
547 for (
const auto& cur :
map) {
557 for (
const auto& cur :
map) {
566 for (
const auto& cur :
map) {
573 TEST(SparseBitMap, IteratorStress2) {
574 const static int N = 1000;
578 for (
unsigned j = 0;
j < N;
j++) {
581 if (log) std::cout <<
"Creating " <<
j <<
" random numbers ..\n";
582 std::set<int> should;
583 while (should.size() <
j) {
584 int n = random() % (N * 10);
590 if (log) std::cout <<
"Filling in input list ..\n";
591 for (
const auto& cur : should) {
596 if (log) std::cout <<
"Collect is list ..\n";
599 for (
const auto& cur :
map) {
605 std::cout <<
"Should: " << should <<
"\n";
606 std::cout <<
" Is: " << is <<
"\n";
612 if (log) std::cout <<
"Comparing lists ..\n";
614 if (log) std::cout <<
"Done\n\n";
618 TEST(SparseBitMap, Find) {
642 auto it =
map.find(12);
648 TEST(SparseBitMap, Size) {
661 TEST(SparseBitMap, CopyAndMerge) {
682 for (
const auto& cur :
m) {
689 for (
const auto& cur :
m) {
696 for (
const auto& cur :
m) {
703 for (
const auto& cur :
m) {
704 EXPECT_TRUE(mapA.test(cur) || mapB.test(cur) || mapC.test(cur));
731 template <
typename Iter>
732 int card(
const range<Iter>& r) {
734 for (
auto it = r.begin(); it != r.end(); ++it) {
740 template <
typename Container>
741 int card(
const Container& c) {
746 TEST(Trie, Iterator) {
766 return random() % max;
770 TEST(Trie, IteratorStress_1D) {
771 using tuple = std::array<RamDomain, 1>;
777 std::set<tuple>
data;
778 while (
data.size() < N) {
780 if (
data.insert(cur).second) {
788 for (
const auto& cur : set) {
796 TEST(Trie, IteratorStress_2D) {
797 using tuple = std::array<RamDomain, 2>;
803 std::set<tuple>
data;
804 while (
data.size() < N) {
808 if (
data.insert(cur).second) {
816 for (
const auto& cur : set) {
824 TEST(Trie, IteratorStress_3D) {
825 using tuple = std::array<RamDomain, 3>;
831 std::set<tuple>
data;
832 while (
data.size() < N) {
837 if (
data.insert(cur).second) {
845 for (
const auto& cur : set) {
853 TEST(Trie, IteratorStress_4D) {
854 using tuple = std::array<RamDomain, 4>;
860 std::set<tuple>
data;
861 while (
data.size() < N) {
867 if (
data.insert(cur).second) {
875 for (
const auto& cur : set) {
883 TEST(Trie, BoundaryTest_1D) {
884 using test_set = Trie<1>;
888 for (
int i = 0;
i < 10;
i++) {
892 auto a = t.lower_bound({5});
895 auto b = t.upper_bound({5});
905 a = t.lower_bound({5});
908 b = t.upper_bound({5});
915 TEST(Trie, BoundaryTest_1D_2) {
916 using test_set = Trie<1>;
920 for (
int i = 0;
i < 10;
i++) {
924 auto a = t.lower_bound({500});
927 auto b = t.upper_bound({500});
937 a = t.lower_bound({500});
940 b = t.upper_bound({500});
947 TEST(Trie, BoundaryTest_1D_Stress) {
949 using test_set = Trie<1>;
950 using ref_set = std::set<value_type>;
955 for (
int i = 5;
i < 10;
i++) {
961 for (
int i = 0;
i < 30;
i++) {
962 value_type key{
i * 50};
964 auto t_lb = t.lower_bound(key);
965 auto r_lb = r.lower_bound(key);
967 EXPECT_EQ(t_lb == t.end(), r_lb == r.end());
968 if (t_lb != t.end() && r_lb != r.end()) {
972 auto t_ub = t.upper_bound(key);
973 auto r_ub = r.upper_bound(key);
975 EXPECT_EQ(t_ub == t.end(), r_ub == r.end());
976 if (t_ub != t.end() && r_ub != r.end()) {
982 TEST(Trie, BoundaryTest_1D_Stress_Dense) {
984 using test_set = Trie<1>;
985 using ref_set = std::set<value_type>;
990 for (
int i = 100;
i < 2000;
i++) {
996 for (
int i = 0;
i < 2500;
i++) {
999 auto t_lb = t.lower_bound(key);
1000 auto r_lb = r.lower_bound(key);
1002 EXPECT_EQ(t_lb == t.end(), r_lb == r.end());
1003 if (t_lb != t.end() && r_lb != r.end()) {
1007 auto t_ub = t.upper_bound(key);
1008 auto r_ub = r.upper_bound(key);
1010 EXPECT_EQ(t_ub == t.end(), r_ub == r.end());
1011 if (t_ub != t.end() && r_ub != r.end()) {
1017 TEST(Trie, BoundaryTest_2D) {
1018 using test_set = Trie<2>;
1022 for (
int i = 0;
i < 10;
i++) {
1023 for (
int j = 0;
j < 10;
j++) {
1028 auto a = t.lower_bound({5, 5});
1032 auto b = t.upper_bound({5, 5});
1043 a = t.lower_bound({5, 5});
1047 b = t.upper_bound({5, 5});
1055 TEST(Trie, BoundaryTest_2D_2) {
1056 using test_set = Trie<2>;
1060 for (
int i = 0;
i < 10;
i++) {
1061 for (
int j = 0;
j < 10;
j++) {
1062 t.insert({
i * 100,
j * 100});
1066 auto a = t.lower_bound({500, 500});
1070 auto b = t.upper_bound({500, 500});
1076 t.insert({500, 500});
1077 t.insert({500, 500});
1078 t.insert({500, 500});
1081 a = t.lower_bound({500, 500});
1085 b = t.upper_bound({500, 500});
1093 TEST(Trie, BoundaryTest_2D_Stress) {
1095 using test_set = Trie<2>;
1096 using ref_set = std::set<value_type>;
1101 for (
int i = 5;
i < 10;
i++) {
1102 for (
int j = 5;
j < 10;
j++) {
1103 t.insert({
i * 100,
j * 100});
1104 r.insert({
i * 100,
j * 100});
1109 for (
int i = 0;
i < 30;
i++) {
1110 for (
int j = 0;
j < 30;
j++) {
1111 value_type key{
i * 50,
j * 50};
1113 auto t_lb = t.lower_bound(key);
1114 auto r_lb = r.lower_bound(key);
1116 EXPECT_EQ(t_lb == t.end(), r_lb == r.end());
1117 if (t_lb != t.end() && r_lb != r.end()) {
1121 auto t_ub = t.upper_bound(key);
1122 auto r_ub = r.upper_bound(key);
1124 EXPECT_EQ(t_ub == t.end(), r_ub == r.end());
1125 if (t_ub != t.end() && r_ub != r.end()) {
1132 TEST(Trie, BoundaryTest_2D_Stress_Dense) {
1134 using test_set = Trie<2>;
1135 using ref_set = std::set<value_type>;
1140 for (
int i = 100;
i < 200;
i++) {
1141 for (
int j = 50;
j < 250;
j++) {
1148 for (
int i = 0;
i < 250;
i++) {
1149 for (
int j = 0;
j < 300;
j++) {
1150 value_type key{
i,
j};
1152 auto t_lb = t.lower_bound(key);
1153 auto r_lb = r.lower_bound(key);
1155 EXPECT_EQ(t_lb == t.end(), r_lb == r.end());
1156 if (t_lb != t.end() && r_lb != r.end()) {
1160 auto t_ub = t.upper_bound(key);
1161 auto r_ub = r.upper_bound(key);
1163 EXPECT_EQ(t_ub == t.end(), r_ub == r.end());
1164 if (t_ub != t.end() && r_ub != r.end()) {
1171 TEST(Trie, BoundaryTest_3D) {
1172 using test_set = Trie<3>;
1176 for (
int i = 0;
i < 10;
i++) {
1177 for (
int j = 0;
j < 10;
j++) {
1178 for (
int k = 0;
k < 10;
k++) {
1179 t.insert({
i,
j,
k});
1184 auto a = t.lower_bound({5, 5, 5});
1189 auto b = t.upper_bound({5, 5, 5});
1198 TEST(Trie, BoundaryTest_3D_2) {
1199 using test_set = Trie<3>;
1203 for (
int i = 0;
i < 10;
i++) {
1204 for (
int j = 0;
j < 10;
j++) {
1205 for (
int k = 0;
k < 10;
k++) {
1206 t.insert({
i * 100,
j * 100,
k * 100});
1211 auto a = t.lower_bound({500, 500, 500});
1216 auto b = t.upper_bound({500, 500, 500});
1225 TEST(Trie, BoundaryTest_3D_Stress) {
1227 using test_set = Trie<3>;
1228 using ref_set = std::set<value_type>;
1233 for (
int i = 5;
i < 10;
i++) {
1234 for (
int j = 5;
j < 10;
j++) {
1235 for (
int k = 5;
k < 10;
k++) {
1236 t.insert({
i * 100,
j * 100,
k * 100});
1237 r.insert({
i * 100,
j * 100,
k * 100});
1243 for (
int i = 0;
i < 30;
i++) {
1244 for (
int j = 0;
j < 30;
j++) {
1245 for (
int k = 0;
k < 30;
k++) {
1246 value_type key{
i * 50,
j * 50,
k * 50};
1248 auto t_lb = t.lower_bound(key);
1249 auto r_lb = r.lower_bound(key);
1251 EXPECT_EQ(t_lb == t.end(), r_lb == r.end());
1252 if (t_lb != t.end() && r_lb != r.end()) {
1256 auto t_ub = t.upper_bound(key);
1257 auto r_ub = r.upper_bound(key);
1259 EXPECT_EQ(t_ub == t.end(), r_ub == r.end());
1260 if (t_ub != t.end() && r_ub != r.end()) {
1268 TEST(Trie, RangeQuery) {
1271 for (
int i = 0;
i < 10;
i++) {
1272 for (
int j = 0;
j < 10;
j++) {
1273 for (
int k = 0;
k < 10;
k++) {
1282 EXPECT_EQ(1000, card(set.getBoundaries<0>({3, 4, 5})));
1285 EXPECT_EQ(100, card(set.getBoundaries<1>({3, 4, 5})));
1288 EXPECT_EQ(10, card(set.getBoundaries<2>({3, 4, 5})));
1291 EXPECT_EQ(1, card(set.getBoundaries<3>({3, 4, 5})));
1294 TEST(Trie, RangeQuery_1D) {
1298 EXPECT_EQ(0, card(set.getBoundaries<0>({3})));
1299 EXPECT_EQ(0, card(set.getBoundaries<1>({3})));
1302 for (
int i = 0;
i < 5;
i++) {
1306 EXPECT_EQ(5, card(set.getBoundaries<0>({3})));
1307 EXPECT_EQ(5, card(set.getBoundaries<0>({7})));
1309 EXPECT_EQ(1, card(set.getBoundaries<1>({3})));
1310 EXPECT_EQ(0, card(set.getBoundaries<1>({7})));
1313 TEST(Trie, RangeQuery_2D) {
1317 EXPECT_EQ(0, card(set.getBoundaries<0>({3, 4})));
1318 EXPECT_EQ(0, card(set.getBoundaries<1>({3, 4})));
1322 for (
int i = 0;
i < 5;
i++) {
1323 for (
int j = 0;
j < 5;
j++) {
1328 EXPECT_EQ(25, card(set.getBoundaries<0>({3, 4})));
1329 EXPECT_EQ(25, card(set.getBoundaries<0>({7, 4})));
1330 EXPECT_EQ(25, card(set.getBoundaries<0>({3, 7})));
1332 EXPECT_EQ(5, card(set.getBoundaries<1>({3, 4})));
1333 EXPECT_EQ(0, card(set.getBoundaries<1>({7, 4})));
1334 EXPECT_EQ(5, card(set.getBoundaries<1>({3, 7})));
1336 EXPECT_EQ(1, card(set.getBoundaries<2>({3, 4})));
1337 EXPECT_EQ(0, card(set.getBoundaries<2>({7, 4})));
1338 EXPECT_EQ(0, card(set.getBoundaries<2>({3, 7})));
1341 TEST(Trie, RangeQuery_3D) {
1345 EXPECT_EQ(0, card(set.getBoundaries<0>({3, 4, 2})));
1346 EXPECT_EQ(0, card(set.getBoundaries<1>({3, 4, 2})));
1348 EXPECT_EQ(0, card(set.getBoundaries<3>({3, 4, 2})));
1351 for (
int i = 0;
i < 5;
i++) {
1352 for (
int j = 0;
j < 5;
j++) {
1353 for (
int k = 0;
k < 5;
k++) {
1354 set.insert({
i,
j,
k});
1359 EXPECT_EQ(125, card(set.getBoundaries<0>({3, 4, 2})));
1360 EXPECT_EQ(125, card(set.getBoundaries<0>({7, 4, 2})));
1361 EXPECT_EQ(125, card(set.getBoundaries<0>({3, 7, 2})));
1362 EXPECT_EQ(125, card(set.getBoundaries<0>({3, 7, 8})));
1364 EXPECT_EQ(25, card(set.getBoundaries<1>({3, 4, 2})));
1365 EXPECT_EQ(0, card(set.getBoundaries<1>({7, 4, 2})));
1366 EXPECT_EQ(25, card(set.getBoundaries<1>({3, 7, 2})));
1367 EXPECT_EQ(25, card(set.getBoundaries<1>({3, 7, 8})));
1369 EXPECT_EQ(5, card(set.getBoundaries<2>({3, 4, 2})));
1370 EXPECT_EQ(0, card(set.getBoundaries<2>({7, 4, 2})));
1371 EXPECT_EQ(0, card(set.getBoundaries<2>({3, 7, 2})));
1372 EXPECT_EQ(0, card(set.getBoundaries<2>({3, 7, 8})));
1373 EXPECT_EQ(5, card(set.getBoundaries<2>({3, 2, 8})));
1375 EXPECT_EQ(1, card(set.getBoundaries<3>({3, 4, 2})));
1376 EXPECT_EQ(0, card(set.getBoundaries<3>({7, 4, 2})));
1377 EXPECT_EQ(0, card(set.getBoundaries<3>({3, 7, 2})));
1378 EXPECT_EQ(0, card(set.getBoundaries<3>({3, 7, 8})));
1381 TEST(Trie, RangeQueryStress) {
1384 for (
int i = 0;
i < 10;
i++) {
1385 for (
int j = 0;
j < 10;
j++) {
1386 for (
int k = 0;
k < 10;
k++) {
1395 EXPECT_EQ(1000, card(set.getBoundaries<0>({3, 4, 5})));
1399 EXPECT_EQ(100, card(set.getBoundaries<1>({x, 4, 5})));
1405 EXPECT_EQ(10, card(set.getBoundaries<2>({x, y, 5})));
1413 EXPECT_EQ(1, card(set.getBoundaries<3>({x, y, z})));
1419 TEST(Trie, Merge_1D) {
1424 for (
int i = 0;
i < 5;
i++) {
1432 for (
int i = 0;
i < 10;
i++) {
1433 EXPECT_EQ(a.contains({i}), c.contains({i}));
1440 for (
int i = 0;
i < 10;
i++) {
1449 for (
int i = 0;
i < 10;
i++) {
1450 EXPECT_EQ(a.contains({i}) ||
b.contains({i}), c.contains({i}));
1455 TEST(Trie, Merge_2D) {
1460 for (
int i = 0;
i < 5;
i++) {
1463 b.insert({
i + 5,
j + 5});
1470 for (
int i = 0;
i < 10;
i++) {
1471 for (
int j = 0;
j < 10;
j++) {
1472 EXPECT_EQ(a.contains({i, j}), c.contains({i, j}));
1480 for (
int i = 0;
i < 10;
i++) {
1481 for (
int j = 0;
j < 10;
j++) {
1482 EXPECT_EQ(
b.contains({i, j}), c.contains({i, j}));
1491 for (
int i = 0;
i < 10;
i++) {
1492 for (
int j = 0;
j < 10;
j++) {
1493 EXPECT_EQ(a.contains({i, j}) ||
b.contains({i, j}), c.contains({i, j}));
1499 TEST(Trie, Merge_3D) {
1504 for (
int i = 0;
i < 5;
i++) {
1506 for (
int k = 0;
k < 5;
k++) {
1507 a.insert({
i,
j,
k});
1508 b.insert({
i + 5,
j + 5,
k + 5});
1516 for (
int i = 0;
i < 10;
i++) {
1517 for (
int j = 0;
j < 10;
j++) {
1518 for (
int k = 0;
k < 5;
k++) {
1519 EXPECT_EQ(a.contains({i, j, k}), c.contains({i, j, k}));
1528 for (
int i = 0;
i < 10;
i++) {
1529 for (
int j = 0;
j < 10;
j++) {
1530 for (
int k = 0;
k < 5;
k++) {
1531 EXPECT_EQ(
b.contains({i, j, k}), c.contains({i, j, k}));
1541 for (
int i = 0;
i < 10;
i++) {
1542 for (
int j = 0;
j < 10;
j++) {
1543 for (
int k = 0;
k < 5;
k++) {
1544 EXPECT_EQ(a.contains({i, j, k}) ||
b.contains({i, j, k}), c.contains({i, j, k}));
1551 TEST(Trie, Merge_Stress) {
1557 std::set<entry_t> ref;
1560 for (
int i = 0;
i < M;
i++) {
1562 for (
int i = 0;
i < N;
i++) {
1567 ref.insert(entry_t{x, y});
1573 std::set<entry_t> is(a.
begin(), a.
end());
1574 std::set<entry_t> should(ref.begin(), ref.end());
1579 TEST(Trie, Merge_Bug) {
1582 a.
insert({25129, 67714});
1583 a.insert({25132, 67714});
1584 a.insert({84808, 68457});
1604 for (
auto it = a.begin(); it != a.end(); ++it) {
1647 TEST(Trie, Limits) {
1651 data.insert({10, 15});
1654 data.insert({(1 << 31) + (1 << 30), 18});
1658 a.insert({140, 15});
1661 b.insert({25445, 18});
1668 for (
auto it =
b.begin(); it !=
b.end(); ++it) {
1674 TEST(Trie, Parallel) {
1675 const int N = 10000;
1679 std::vector<entry_t> list;
1682 while (
filter.size() < N) {
1684 if (
filter.insert(entry)) {
1685 list.push_back(entry);
1690 for (
int dup = 1; dup < 4; dup++) {
1692 std::vector<entry_t> full;
1693 for (
int i = 0;
i < dup;
i++) {
1694 for (
const auto& cur : list) {
1695 full.push_back(cur);
1700 std::random_device rd;
1701 std::mt19937 generator(rd());
1703 std::shuffle(full.begin(), full.end(), generator);
1707 #pragma omp parallel for
1708 for (
auto it = full.begin(); it < full.end(); ++it) {
1715 std::set<entry_t> should(full.begin(), full.end());
1716 std::set<entry_t> is(res.begin(), res.end());
1718 for (
const auto& cur : should) {
1719 EXPECT_TRUE(res.contains(cur)) <<
"Missing: " << cur <<
"\n";
1722 for (
const auto& cur : res) {
1723 EXPECT_TRUE(should.find(cur) != should.end()) <<
"Additional: " << cur <<
"\n"
1724 <<
"Contained: " << res.contains(cur) <<
"\n";
1727 std::vector<entry_t> extra;
1728 for (
const auto& cur : is) {
1729 if (should.find(cur) == should.end()) extra.push_back(cur);
1731 EXPECT_TRUE(extra.empty()) <<
"Extra elments: " << extra <<
"\n";
1733 std::vector<entry_t> missing;
1734 for (
const auto& cur : should) {
1735 if (is.find(cur) == is.end()) missing.push_back(cur);
1737 EXPECT_TRUE(missing.empty()) <<
"Missing elments: " << missing <<
"\n"
1738 <<
"All Elements: " << should <<
"\n";