diff --git a/library/cpp/iterator/CMakeLists.txt b/library/cpp/iterator/CMakeLists.txt index 41e93423370..ada78e6f774 100644 --- a/library/cpp/iterator/CMakeLists.txt +++ b/library/cpp/iterator/CMakeLists.txt @@ -1,3 +1,7 @@ +if (YDB_SDK_TESTS) + add_subdirectory(ut) +endif() + _ydb_sdk_add_library(iterator) target_link_libraries(iterator PUBLIC diff --git a/library/cpp/iterator/ut/CMakeLists.txt b/library/cpp/iterator/ut/CMakeLists.txt new file mode 100644 index 00000000000..c53717435a4 --- /dev/null +++ b/library/cpp/iterator/ut/CMakeLists.txt @@ -0,0 +1,64 @@ +add_ydb_test(NAME iterator-filtering_ut GTEST + SOURCES + filtering_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME iterator-functools_ut GTEST + SOURCES + functools_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME iterator-iterate_keys_ut GTEST + SOURCES + iterate_keys_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME iterator-iterate_values_ut GTEST + SOURCES + iterate_values_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME iterator-mapped_ut GTEST + SOURCES + mapped_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME iterator-zip_ut GTEST + SOURCES + zip_ut.cpp + LINK_LIBRARIES + iterator + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/iterator/ut/filtering_ut.cpp b/library/cpp/iterator/ut/filtering_ut.cpp index 60c20446988..57ede17fd8a 100644 --- a/library/cpp/iterator/ut/filtering_ut.cpp +++ b/library/cpp/iterator/ut/filtering_ut.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include diff --git a/library/cpp/iterator/ut/functools_ut.cpp b/library/cpp/iterator/ut/functools_ut.cpp index 2dee9a55c85..1d7f2f7ad61 100644 --- a/library/cpp/iterator/ut/functools_ut.cpp +++ b/library/cpp/iterator/ut/functools_ut.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include #include diff --git a/library/cpp/iterator/ut/iterate_keys_ut.cpp b/library/cpp/iterator/ut/iterate_keys_ut.cpp index 49eb866b6ec..a4cf31c238d 100644 --- a/library/cpp/iterator/ut/iterate_keys_ut.cpp +++ b/library/cpp/iterator/ut/iterate_keys_ut.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include diff --git a/library/cpp/iterator/ut/iterate_values_ut.cpp b/library/cpp/iterator/ut/iterate_values_ut.cpp index ed099e560d0..440c2f29ca8 100644 --- a/library/cpp/iterator/ut/iterate_values_ut.cpp +++ b/library/cpp/iterator/ut/iterate_values_ut.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include diff --git a/library/cpp/iterator/ut/mapped_ut.cpp b/library/cpp/iterator/ut/mapped_ut.cpp index 440cd37945a..6dab3df25e9 100644 --- a/library/cpp/iterator/ut/mapped_ut.cpp +++ b/library/cpp/iterator/ut/mapped_ut.cpp @@ -1,6 +1,7 @@ #include -#include +#include +#include #include #include diff --git a/library/cpp/iterator/ut/zip_ut.cpp b/library/cpp/iterator/ut/zip_ut.cpp index 68d496515c3..72ac1493031 100644 --- a/library/cpp/iterator/ut/zip_ut.cpp +++ b/library/cpp/iterator/ut/zip_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include @@ -25,4 +25,3 @@ TEST(TIterator, ZipSimplePostIncrement) { EXPECT_EQ(std::next(cur), last); } - diff --git a/library/cpp/yson/CMakeLists.txt b/library/cpp/yson/CMakeLists.txt index f1aaa232d4b..ae7273c701a 100644 --- a/library/cpp/yson/CMakeLists.txt +++ b/library/cpp/yson/CMakeLists.txt @@ -1,13 +1,17 @@ +if (YDB_SDK_TESTS) + add_subdirectory(ut) +endif() + _ydb_sdk_add_library(yson) -target_link_libraries(yson +target_link_libraries(yson PUBLIC yutil yt-misc yt-yson ) -target_sources(yson +target_sources(yson PRIVATE consumer.cpp lexer.cpp diff --git a/library/cpp/yson/ut/CMakeLists.txt b/library/cpp/yson/ut/CMakeLists.txt new file mode 100644 index 00000000000..1490a412cf2 --- /dev/null +++ b/library/cpp/yson/ut/CMakeLists.txt @@ -0,0 +1,9 @@ +add_ydb_test(NAME yson-ut GTEST + SOURCES + yson_ut.cpp + LINK_LIBRARIES + yson + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yson/ut/yson_ut.cpp b/library/cpp/yson/ut/yson_ut.cpp index b381bbabb8c..ce952d8dae3 100644 --- a/library/cpp/yson/ut/yson_ut.cpp +++ b/library/cpp/yson/ut/yson_ut.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include diff --git a/library/cpp/yt/CMakeLists.txt b/library/cpp/yt/CMakeLists.txt index 920be15656b..70d206dee3b 100644 --- a/library/cpp/yt/CMakeLists.txt +++ b/library/cpp/yt/CMakeLists.txt @@ -1,3 +1,13 @@ +if (YDB_SDK_TESTS) + add_subdirectory(coding/unittests) + add_subdirectory(containers/unittests) + add_subdirectory(memory/unittests) + add_subdirectory(misc/unittests) + add_subdirectory(small_containers/unittests) + add_subdirectory(string/unittests) + add_subdirectory(yson_string/unittests) +endif() + _ydb_sdk_add_library(yt-assert) target_compile_options(yt-assert PRIVATE -Wdeprecated-this-capture @@ -33,8 +43,11 @@ _ydb_sdk_add_library(yt-exception) target_compile_options(yt-exception PRIVATE -Wdeprecated-this-capture ) -target_link_libraries(yt-exception PUBLIC - yutil +target_link_libraries(yt-exception + PUBLIC + yutil + PRIVATE + yt-assert ) target_sources(yt-exception PRIVATE exception/exception.cpp @@ -107,7 +120,7 @@ _ydb_sdk_install_targets(TARGETS yt-misc) _ydb_sdk_add_library(yt-small_containers INTERFACE) -target_link_libraries(yt-small_containers +target_link_libraries(yt-small_containers INTERFACE yutil yt-assert @@ -121,7 +134,7 @@ _ydb_sdk_add_library(yt-string) target_compile_options(yt-string PRIVATE -Wdeprecated-this-capture ) -target_link_libraries(yt-string +target_link_libraries(yt-string PUBLIC yutil yt-assert @@ -136,6 +149,7 @@ target_sources(yt-string string/guid.cpp string/string.cpp string/format.cpp + string/format_string.cpp ) _ydb_sdk_install_targets(TARGETS yt-string) diff --git a/library/cpp/yt/coding/unittests/CMakeLists.txt b/library/cpp/yt/coding/unittests/CMakeLists.txt new file mode 100644 index 00000000000..38aa1f8c2d8 --- /dev/null +++ b/library/cpp/yt/coding/unittests/CMakeLists.txt @@ -0,0 +1,19 @@ +add_ydb_test(NAME yt-coding-varint_ut GTEST + SOURCES + varint_ut.cpp + LINK_LIBRARIES + yt-coding + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-coding-zig_zag_ut GTEST + SOURCES + zig_zag_ut.cpp + LINK_LIBRARIES + yt-coding + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yt/coding/unittests/varint_ut.cpp b/library/cpp/yt/coding/unittests/varint_ut.cpp index ed83ab5c92b..5053fa751a6 100644 --- a/library/cpp/yt/coding/unittests/varint_ut.cpp +++ b/library/cpp/yt/coding/unittests/varint_ut.cpp @@ -1,9 +1,11 @@ -#include +#include #include #include +#include + #include #include diff --git a/library/cpp/yt/coding/unittests/zig_zag_ut.cpp b/library/cpp/yt/coding/unittests/zig_zag_ut.cpp index fae4e63064e..6efb7c57b7f 100644 --- a/library/cpp/yt/coding/unittests/zig_zag_ut.cpp +++ b/library/cpp/yt/coding/unittests/zig_zag_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/containers/unittests/CMakeLists.txt b/library/cpp/yt/containers/unittests/CMakeLists.txt new file mode 100644 index 00000000000..3a734babd79 --- /dev/null +++ b/library/cpp/yt/containers/unittests/CMakeLists.txt @@ -0,0 +1,21 @@ +add_ydb_test(NAME yt-containers-enum_indexed_array_ut GTEST + SOURCES + enum_indexed_array_ut.cpp + LINK_LIBRARIES + yt-containers + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-containers-sharded_set_ut GTEST + SOURCES + sharded_set_ut.cpp + LINK_LIBRARIES + yt-containers + yt-string + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yt/containers/unittests/enum_indexed_array_ut.cpp b/library/cpp/yt/containers/unittests/enum_indexed_array_ut.cpp index a87c417d7d8..8715d2e715d 100644 --- a/library/cpp/yt/containers/unittests/enum_indexed_array_ut.cpp +++ b/library/cpp/yt/containers/unittests/enum_indexed_array_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -42,4 +42,3 @@ TEST(TEnumIndexedArrayTest, Simple) } // namespace } // namespace NYT - diff --git a/library/cpp/yt/containers/unittests/sharded_set_ut.cpp b/library/cpp/yt/containers/unittests/sharded_set_ut.cpp index a954ea5151c..5caba9cebac 100644 --- a/library/cpp/yt/containers/unittests/sharded_set_ut.cpp +++ b/library/cpp/yt/containers/unittests/sharded_set_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include diff --git a/library/cpp/yt/memory/unittests/CMakeLists.txt b/library/cpp/yt/memory/unittests/CMakeLists.txt new file mode 100644 index 00000000000..e21facab6f6 --- /dev/null +++ b/library/cpp/yt/memory/unittests/CMakeLists.txt @@ -0,0 +1,123 @@ +add_ydb_test(NAME yt-memory-atomic_intrusive_ptr_ut GTEST + SOURCES + atomic_intrusive_ptr_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME yt-memory-chunked_memory_pool_allocator_ut GTEST + SOURCES + chunked_memory_pool_allocator_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-chunked_memory_pool_output_ut GTEST + SOURCES + chunked_memory_pool_output_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-chunked_memory_pool_ut GTEST + SOURCES + chunked_memory_pool_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-erased_storage_ut GTEST + SOURCES + erased_storage_ut.cpp + LINK_LIBRARIES + yt-memory + int128 + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-free_list_ut GTEST + SOURCES + free_list_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-function_view_ut GTEST + SOURCES + function_view_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-intrusive_ptr_ut GTEST + SOURCES + intrusive_ptr_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + GTest::gmock + LABELS + unit +) + +add_ydb_test(NAME yt-memory-ref_ut GTEST + SOURCES + ref_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-safe_memory_reader_ut GTEST + SOURCES + safe_memory_reader_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-shared_range_ut GTEST + SOURCES + shared_range_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-memory-weak_ptr_ut GTEST + SOURCES + weak_ptr_ut.cpp + LINK_LIBRARIES + yt-memory + GTest::gtest_main + GTest::gmock + LABELS + unit +) diff --git a/library/cpp/yt/memory/unittests/atomic_intrusive_ptr_ut.cpp b/library/cpp/yt/memory/unittests/atomic_intrusive_ptr_ut.cpp index 68489fcdf7c..803665c8f80 100644 --- a/library/cpp/yt/memory/unittests/atomic_intrusive_ptr_ut.cpp +++ b/library/cpp/yt/memory/unittests/atomic_intrusive_ptr_ut.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include diff --git a/library/cpp/yt/memory/unittests/chunked_memory_pool_allocator_ut.cpp b/library/cpp/yt/memory/unittests/chunked_memory_pool_allocator_ut.cpp index 214ee80643f..00704d078d0 100644 --- a/library/cpp/yt/memory/unittests/chunked_memory_pool_allocator_ut.cpp +++ b/library/cpp/yt/memory/unittests/chunked_memory_pool_allocator_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/library/cpp/yt/memory/unittests/chunked_memory_pool_output_ut.cpp b/library/cpp/yt/memory/unittests/chunked_memory_pool_output_ut.cpp index 22ee9e379e9..a22d645b525 100644 --- a/library/cpp/yt/memory/unittests/chunked_memory_pool_output_ut.cpp +++ b/library/cpp/yt/memory/unittests/chunked_memory_pool_output_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp b/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp index 55f9f9945af..0ff9cb93f32 100644 --- a/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp +++ b/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include diff --git a/library/cpp/yt/memory/unittests/erased_storage_ut.cpp b/library/cpp/yt/memory/unittests/erased_storage_ut.cpp index 194c8e7fce5..753fca3d78a 100644 --- a/library/cpp/yt/memory/unittests/erased_storage_ut.cpp +++ b/library/cpp/yt/memory/unittests/erased_storage_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/memory/unittests/free_list_ut.cpp b/library/cpp/yt/memory/unittests/free_list_ut.cpp index 3d2ecf103ef..8a600325ced 100644 --- a/library/cpp/yt/memory/unittests/free_list_ut.cpp +++ b/library/cpp/yt/memory/unittests/free_list_ut.cpp @@ -1,7 +1,9 @@ -#include +#include #include +#include + #include #include diff --git a/library/cpp/yt/memory/unittests/function_view_ut.cpp b/library/cpp/yt/memory/unittests/function_view_ut.cpp index 99af41793cc..eaf5d6dac57 100644 --- a/library/cpp/yt/memory/unittests/function_view_ut.cpp +++ b/library/cpp/yt/memory/unittests/function_view_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/memory/unittests/intrusive_ptr_ut.cpp b/library/cpp/yt/memory/unittests/intrusive_ptr_ut.cpp index f20e5cff10f..0d360a0a47d 100644 --- a/library/cpp/yt/memory/unittests/intrusive_ptr_ut.cpp +++ b/library/cpp/yt/memory/unittests/intrusive_ptr_ut.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include @@ -7,6 +8,7 @@ #include #include +#include #include diff --git a/library/cpp/yt/memory/unittests/ref_ut.cpp b/library/cpp/yt/memory/unittests/ref_ut.cpp index 8ecd57e15d2..fb86cd396b1 100644 --- a/library/cpp/yt/memory/unittests/ref_ut.cpp +++ b/library/cpp/yt/memory/unittests/ref_ut.cpp @@ -1,6 +1,5 @@ -#include +#include -#include #include diff --git a/library/cpp/yt/memory/unittests/safe_memory_reader_ut.cpp b/library/cpp/yt/memory/unittests/safe_memory_reader_ut.cpp index 9873dd80bea..7c5d397c435 100644 --- a/library/cpp/yt/memory/unittests/safe_memory_reader_ut.cpp +++ b/library/cpp/yt/memory/unittests/safe_memory_reader_ut.cpp @@ -1,5 +1,5 @@ -#include +#include #include diff --git a/library/cpp/yt/memory/unittests/shared_range_ut.cpp b/library/cpp/yt/memory/unittests/shared_range_ut.cpp index 7b86a1eb15d..09167c3ae44 100644 --- a/library/cpp/yt/memory/unittests/shared_range_ut.cpp +++ b/library/cpp/yt/memory/unittests/shared_range_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/library/cpp/yt/memory/unittests/weak_ptr_ut.cpp b/library/cpp/yt/memory/unittests/weak_ptr_ut.cpp index f19809100fe..4f80bc8be6a 100644 --- a/library/cpp/yt/memory/unittests/weak_ptr_ut.cpp +++ b/library/cpp/yt/memory/unittests/weak_ptr_ut.cpp @@ -1,4 +1,5 @@ -#include +#include +#include #include #include diff --git a/library/cpp/yt/misc/unittests/CMakeLists.txt b/library/cpp/yt/misc/unittests/CMakeLists.txt new file mode 100644 index 00000000000..23c13008884 --- /dev/null +++ b/library/cpp/yt/misc/unittests/CMakeLists.txt @@ -0,0 +1,42 @@ +add_ydb_test(NAME yt-misc-enum_ut GTEST + SOURCES + enum_ut.cpp + LINK_LIBRARIES + yt-misc + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-misc-guid_ut GTEST + SOURCES + guid_ut.cpp + LINK_LIBRARIES + yt-misc + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-misc-preprocessor_ut GTEST + SOURCES + preprocessor_ut.cpp + LINK_LIBRARIES + yt-misc + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-misc-strong_typedef_ut GTEST + SOURCES + strong_typedef_ut.cpp + LINK_LIBRARIES + yt-misc + yt-string + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yt/misc/unittests/enum_ut.cpp b/library/cpp/yt/misc/unittests/enum_ut.cpp index 63b8666ae1e..3e58d2e94fd 100644 --- a/library/cpp/yt/misc/unittests/enum_ut.cpp +++ b/library/cpp/yt/misc/unittests/enum_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -284,4 +284,3 @@ TEST(TEnumTest, Cast) } // namespace } // namespace NYT - diff --git a/library/cpp/yt/misc/unittests/guid_ut.cpp b/library/cpp/yt/misc/unittests/guid_ut.cpp index b0ec7effbfb..bb1099ad43b 100644 --- a/library/cpp/yt/misc/unittests/guid_ut.cpp +++ b/library/cpp/yt/misc/unittests/guid_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/misc/unittests/preprocessor_ut.cpp b/library/cpp/yt/misc/unittests/preprocessor_ut.cpp index b712d8a48f5..1659df82752 100644 --- a/library/cpp/yt/misc/unittests/preprocessor_ut.cpp +++ b/library/cpp/yt/misc/unittests/preprocessor_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/small_containers/unittests/CMakeLists.txt b/library/cpp/yt/small_containers/unittests/CMakeLists.txt new file mode 100644 index 00000000000..9339a5d68c0 --- /dev/null +++ b/library/cpp/yt/small_containers/unittests/CMakeLists.txt @@ -0,0 +1,55 @@ +add_ydb_test(NAME yt-small_containers-compact_flat_map_ut GTEST + SOURCES + compact_flat_map_ut.cpp + LINK_LIBRARIES + yt-small_containers + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-small_containers-compact_heap_ut GTEST + SOURCES + compact_heap_ut.cpp + LINK_LIBRARIES + yt-small_containers + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-small_containers-compact_queue_ut GTEST + SOURCES + compact_queue_ut.cpp + LINK_LIBRARIES + yt-small_containers + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-small_containers-compact_set_ut GTEST + SOURCES + compact_set_ut.cpp + LINK_LIBRARIES + yt-small_containers + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-small_containers-compact_vector_ut GTEST + SOURCES + compact_vector_ut.cpp + LINK_LIBRARIES + yt-small_containers + yt-string + GTest::gtest_main + GTest::gmock + LABELS + unit +) diff --git a/library/cpp/yt/small_containers/unittests/compact_flat_map_ut.cpp b/library/cpp/yt/small_containers/unittests/compact_flat_map_ut.cpp index c4b3508652e..a367850f2cf 100644 --- a/library/cpp/yt/small_containers/unittests/compact_flat_map_ut.cpp +++ b/library/cpp/yt/small_containers/unittests/compact_flat_map_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/library/cpp/yt/small_containers/unittests/compact_heap_ut.cpp b/library/cpp/yt/small_containers/unittests/compact_heap_ut.cpp index 259c576e87c..ff20ee06cf2 100644 --- a/library/cpp/yt/small_containers/unittests/compact_heap_ut.cpp +++ b/library/cpp/yt/small_containers/unittests/compact_heap_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include diff --git a/library/cpp/yt/small_containers/unittests/compact_queue_ut.cpp b/library/cpp/yt/small_containers/unittests/compact_queue_ut.cpp index acea1c5c714..6f105ae539e 100644 --- a/library/cpp/yt/small_containers/unittests/compact_queue_ut.cpp +++ b/library/cpp/yt/small_containers/unittests/compact_queue_ut.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/library/cpp/yt/small_containers/unittests/compact_set_ut.cpp b/library/cpp/yt/small_containers/unittests/compact_set_ut.cpp index 17b96a21954..d042e7bed63 100644 --- a/library/cpp/yt/small_containers/unittests/compact_set_ut.cpp +++ b/library/cpp/yt/small_containers/unittests/compact_set_ut.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include diff --git a/library/cpp/yt/small_containers/unittests/compact_vector_ut.cpp b/library/cpp/yt/small_containers/unittests/compact_vector_ut.cpp index 715de64dfb9..706f1716038 100644 --- a/library/cpp/yt/small_containers/unittests/compact_vector_ut.cpp +++ b/library/cpp/yt/small_containers/unittests/compact_vector_ut.cpp @@ -14,7 +14,8 @@ #include -#include +#include +#include #include diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index 4eaa70bef2f..26df8cf90b2 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -126,7 +126,7 @@ inline TString TStringBuilder::Flush() inline void TStringBuilder::DoReset() { - Buffer_ = {}; + Buffer_ = TString{}; } inline void TStringBuilder::DoReserve(size_t newLength) diff --git a/library/cpp/yt/string/unittests/CMakeLists.txt b/library/cpp/yt/string/unittests/CMakeLists.txt new file mode 100644 index 00000000000..84e591173d3 --- /dev/null +++ b/library/cpp/yt/string/unittests/CMakeLists.txt @@ -0,0 +1,39 @@ +add_ydb_test(NAME yt-string-enum_ut GTEST + SOURCES + enum_ut.cpp + LINK_LIBRARIES + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-string-format_ut GTEST + SOURCES + format_ut.cpp + LINK_LIBRARIES + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-string-guid_ut GTEST + SOURCES + guid_ut.cpp + LINK_LIBRARIES + yt-string + GTest::gtest_main + LABELS + unit +) + +add_ydb_test(NAME yt-string-string_ut GTEST + SOURCES + string_ut.cpp + LINK_LIBRARIES + yt-string + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yt/string/unittests/enum_ut.cpp b/library/cpp/yt/string/unittests/enum_ut.cpp index be5387151a0..64f9096304d 100644 --- a/library/cpp/yt/string/unittests/enum_ut.cpp +++ b/library/cpp/yt/string/unittests/enum_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -84,5 +84,3 @@ TEST(TParseEnumTest, ParseBitEnum) } // namespace } // namespace NYT - - diff --git a/library/cpp/yt/string/unittests/format_ut.cpp b/library/cpp/yt/string/unittests/format_ut.cpp index 4083338c44a..ccc9641d147 100644 --- a/library/cpp/yt/string/unittests/format_ut.cpp +++ b/library/cpp/yt/string/unittests/format_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/string/unittests/guid_ut.cpp b/library/cpp/yt/string/unittests/guid_ut.cpp index ed02b873917..79c6e79f89c 100644 --- a/library/cpp/yt/string/unittests/guid_ut.cpp +++ b/library/cpp/yt/string/unittests/guid_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/library/cpp/yt/string/unittests/string_ut.cpp b/library/cpp/yt/string/unittests/string_ut.cpp index 3e12312af0b..5df12dccc16 100644 --- a/library/cpp/yt/string/unittests/string_ut.cpp +++ b/library/cpp/yt/string/unittests/string_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -49,4 +49,3 @@ TEST(TStringTest, CamelCaseToUnderscoreCase) } // namespace } // namespace NYT - diff --git a/library/cpp/yt/yson_string/unittests/CMakeLists.txt b/library/cpp/yt/yson_string/unittests/CMakeLists.txt new file mode 100644 index 00000000000..16fa0bcc582 --- /dev/null +++ b/library/cpp/yt/yson_string/unittests/CMakeLists.txt @@ -0,0 +1,21 @@ +#[=[ +TODO: missing `library/cpp/testing/gtest_extensions` +add_ydb_test(NAME yt-yson_string-convert_ut GTEST + SOURCES + convert_ut.cpp + LINK_LIBRARIES + yt-yson_string + GTest::gtest_main + LABELS + unit +) +#]=] +add_ydb_test(NAME yt-yson_string-saveload_ut GTEST + SOURCES + saveload_ut.cpp + LINK_LIBRARIES + yt-yson_string + GTest::gtest_main + LABELS + unit +) diff --git a/library/cpp/yt/yson_string/unittests/convert_ut.cpp b/library/cpp/yt/yson_string/unittests/convert_ut.cpp index 3a64f63896c..6ef51f6cafb 100644 --- a/library/cpp/yt/yson_string/unittests/convert_ut.cpp +++ b/library/cpp/yt/yson_string/unittests/convert_ut.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/library/cpp/yt/yson_string/unittests/saveload_ut.cpp b/library/cpp/yt/yson_string/unittests/saveload_ut.cpp index 33a98a30ea4..f40b0ac8c20 100644 --- a/library/cpp/yt/yson_string/unittests/saveload_ut.cpp +++ b/library/cpp/yt/yson_string/unittests/saveload_ut.cpp @@ -1,6 +1,4 @@ -#include - -#include +#include #include