Skip to content

Commit c7e0965

Browse files
mpimenovvmihaylenko
authored andcommitted
[base] Unified stl_add and stl_helpers.
1 parent 4a44e1d commit c7e0965

File tree

159 files changed

+754
-807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+754
-807
lines changed

base/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ set(
6363
src_point.cpp
6464
src_point.hpp
6565
stats.hpp
66-
stl_add.hpp
6766
stl_helpers.hpp
6867
stl_iterator.hpp
6968
string_format.cpp

base/base_tests/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ set(
3030
rolling_hash_test.cpp
3131
scope_guard_test.cpp
3232
small_set_test.cpp
33-
stl_add_test.cpp
34-
stl_helpers_test.cpp
33+
stl_helpers_tests.cpp
3534
string_format_test.cpp
3635
string_utils_test.cpp
3736
suffix_array_tests.cpp

base/base_tests/cache_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include "testing/testing.hpp"
2+
23
#include "base/cache.hpp"
34
#include "base/macros.hpp"
4-
#include "base/stl_add.hpp"
5+
#include "base/stl_helpers.hpp"
56

67
#include <functional>
78

@@ -86,7 +87,7 @@ UNIT_TEST(CacheSmoke_0)
8687
cache.Find(0, found);
8788
TEST(!found, ());
8889
std::vector<char> v;
89-
cache.ForEachValue(MakeBackInsertFunctor(v));
90+
cache.ForEachValue(base::MakeBackInsertFunctor(v));
9091
TEST_EQUAL(v, std::vector<char>(8, 0), ());
9192
}
9293

base/base_tests/regexp_test.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "testing/testing.hpp"
22

3-
#include "base/stl_add.hpp"
3+
#include "base/stl_helpers.hpp"
44
#include "base/string_utils.hpp"
55

66
#include <regex>
@@ -29,7 +29,7 @@ UNIT_TEST(RegExp_ForEachMatched)
2929
{
3030
std::string const s = "6.66, 9.99";
3131
std::vector<std::string> v;
32-
strings::ForEachMatched(s, exp, MakeBackInsertFunctor(v));
32+
strings::ForEachMatched(s, exp, base::MakeBackInsertFunctor(v));
3333
TEST_EQUAL(v.size(), 1, ());
3434
TEST_EQUAL(v[0], s, ());
3535
}
@@ -38,7 +38,7 @@ UNIT_TEST(RegExp_ForEachMatched)
3838
std::string const s1 = "6.66, 9.99";
3939
std::string const s2 = "-5.55, -7.77";
4040
std::vector<std::string> v;
41-
strings::ForEachMatched(s1 + " 180 , bfuewib 365@" + s2, exp, MakeBackInsertFunctor(v));
41+
strings::ForEachMatched(s1 + " 180 , bfuewib 365@" + s2, exp, base::MakeBackInsertFunctor(v));
4242
TEST_EQUAL(v.size(), 2, ());
4343
TEST_EQUAL(v[0], s1, ());
4444
TEST_EQUAL(v[1], s2, ());
@@ -47,30 +47,30 @@ UNIT_TEST(RegExp_ForEachMatched)
4747
{
4848
std::string const s = "X6.66, 9.99";
4949
std::vector<std::string> v;
50-
strings::ForEachMatched(s, exp, MakeBackInsertFunctor(v));
50+
strings::ForEachMatched(s, exp, base::MakeBackInsertFunctor(v));
5151
TEST_EQUAL(v.size(), 1, ());
5252
TEST_EQUAL(v[0], std::string(s.begin() + 1, s.end()), ());
5353
}
5454

5555
{
5656
std::string const s = "6.66, 9.99X";
5757
std::vector<std::string> v;
58-
strings::ForEachMatched(s, exp, MakeBackInsertFunctor(v));
58+
strings::ForEachMatched(s, exp, base::MakeBackInsertFunctor(v));
5959
TEST_EQUAL(v.size(), 1, ());
6060
TEST_EQUAL(v[0], std::string(s.begin(), s.end() - 1), ());
6161
}
6262

6363
{
6464
std::string const s = "6.66X, 9.99";
6565
std::vector<std::string> v;
66-
strings::ForEachMatched(s, exp, MakeBackInsertFunctor(v));
66+
strings::ForEachMatched(s, exp, base::MakeBackInsertFunctor(v));
6767
TEST_EQUAL(v.size(), 0, ());
6868
}
6969

7070
{
7171
std::string const s = "6.66, X9.99";
7272
std::vector<std::string> v;
73-
strings::ForEachMatched(s, exp, MakeBackInsertFunctor(v));
73+
strings::ForEachMatched(s, exp, base::MakeBackInsertFunctor(v));
7474
TEST_EQUAL(v.size(), 0, ());
7575
}
7676
}

base/base_tests/stl_helpers_test.cpp

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)