File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,7 @@ if (YDB_SDK_TESTS)
91
91
stack_ut.cpp
92
92
store_policy_ut.cpp
93
93
strbuf_ut.cpp
94
- # See fix/util-unit-tests branch
95
- # string_transparent_hash_ut.cpp
94
+ string_transparent_hash_ut.cpp
96
95
string_ut.cpp
97
96
typelist_ut.cpp
98
97
typetraits_ut.cpp
@@ -162,8 +161,7 @@ if (YDB_SDK_TESTS)
162
161
163
162
add_ydb_multiple_tests (PREFIX util BASE_DIR random
164
163
FILES
165
- # See fix/util-unit-tests branch
166
- # common_ops_ut.cpp
164
+ common_ops_ut.cpp
167
165
easy_ut.cpp
168
166
entropy_ut.cpp
169
167
fast_ut.cpp
@@ -246,17 +244,15 @@ if (YDB_SDK_TESTS)
246
244
cpu_id_ut.cpp
247
245
daemon_ut.cpp
248
246
datetime_ut.cpp
249
- # See fix/util-unit-tests branch
250
- # direct_io_ut.cpp
247
+ direct_io_ut.cpp
251
248
env_ut.cpp
252
249
error_ut.cpp
253
250
event_ut.cpp
254
251
execpath_ut.cpp
255
252
filemap_ut.cpp
256
253
file_ut.cpp
257
254
flock_ut.cpp
258
- # See fix/util-unit-tests branch
259
- # fstat_ut.cpp
255
+ fstat_ut.cpp
260
256
fs_ut.cpp
261
257
getpid_ut.cpp
262
258
guard_ut.cpp
@@ -281,8 +277,7 @@ if (YDB_SDK_TESTS)
281
277
src_root_ut.cpp
282
278
tempfile_ut.cpp
283
279
tls_ut.cpp
284
- # See fix/util-unit-tests branch
285
- # type_name_ut.cpp
280
+ type_name_ut.cpp
286
281
types_ut.cpp
287
282
# TODO: add library/cpp/testing/benchmark
288
283
# depends only on NBench::Clobber, that's a memory optimization barrier
Original file line number Diff line number Diff line change 3
3
#include " strbuf.h"
4
4
5
5
#include < library/cpp/testing/unittest/registar.h>
6
- #include < library/cpp/containers/absl_flat_hash/flat_hash_set.h>
6
+
7
+ #if __cplusplus < 202002L
8
+ #include < library/cpp/containers/absl_flat_hash/flat_hash_set.h>
9
+ #else
10
+ #include < unordered_set>
11
+ #endif
7
12
8
13
#include < util/str_stl.h>
9
14
10
15
Y_UNIT_TEST_SUITE (StringHashFunctorTests) {
11
16
Y_UNIT_TEST (TestTransparencyWithUnorderedSet) {
12
17
// Using Abseil hash set because `std::unordered_set` is transparent only from C++20 (while
13
18
// we stuck with C++17 right now).
14
- absl::flat_hash_set<TString, THash<TString>, TEqualTo<TString>> s = {" foo" };
19
+ using TTransparentHashSet =
20
+ #if __cplusplus < 202002L
21
+ absl::flat_hash_set
22
+ #else
23
+ std::unordered_set
24
+ #endif
25
+ <TString, THash<TString>, TEqualTo<TString>>;
26
+
27
+ TTransparentHashSet s = {" foo" };
15
28
// If either `THash` or `TEqualTo` is not transparent compilation will fail.
16
29
UNIT_ASSERT_UNEQUAL (s.find (TStringBuf (" foo" )), s.end ());
17
30
UNIT_ASSERT_EQUAL (s.find (TStringBuf (" bar" )), s.end ());
You can’t perform that action at this time.
0 commit comments