Skip to content

Commit e4f06d5

Browse files
authored
Library unit tests (#291)
* Add tests for library/cpp/getopts into listfile (#183) * Add tests for library/cpp/http/fetch into listfile (#184) * Add tests for library/cpp/http/io into listfile (#185) * Add tests for library/cpp/http/misc into listfile (#186) * Add tests for library/cpp/lcs into listfile (#191) * Add tests for library/cpp/streams/brotli into listfile (#198) * Add tests for library/cpp/streams/bzip2 into listfile (#199) * Add tests for library/cpp/streams/zstd into listfile (#201) * Add tests for library/cpp/string_utils into listfile (#202) * Add tests for library/cpp/threading/chunk_queue into listfile (#203) * Add tests for library/cpp/threading/light_rw_lock into listfile (#206) * Add tests for library/cpp/threading/unicode/normalization into listfile (#208)
1 parent 007d763 commit e4f06d5

File tree

17 files changed

+304
-1
lines changed

17 files changed

+304
-1
lines changed

library/cpp/getopt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if (YDB_SDK_TESTS)
2+
add_subdirectory(ut)
3+
endif()
4+
15
_ydb_sdk_add_library(getopt-small)
26
target_link_libraries(getopt-small
37
PUBLIC

library/cpp/getopt/ut/CMakeLists.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
add_ydb_test(NAME getopt-last_getopt_ut
2+
SOURCES
3+
last_getopt_ut.cpp
4+
LINK_LIBRARIES
5+
getopt
6+
cpp-testing-unittest_main
7+
LABELS
8+
unit
9+
)
10+
11+
add_ydb_test(NAME getopt-modchooser_ut
12+
SOURCES
13+
modchooser_ut.cpp
14+
LINK_LIBRARIES
15+
getopt
16+
cpp-testing-unittest_main
17+
LABELS
18+
unit
19+
)
20+
21+
add_ydb_test(NAME getopt-opt2_ut
22+
SOURCES
23+
opt2_ut.cpp
24+
LINK_LIBRARIES
25+
getopt
26+
cpp-testing-unittest_main
27+
LABELS
28+
unit
29+
)
30+
31+
add_ydb_test(NAME getopt-opt_ut
32+
SOURCES
33+
opt_ut.cpp
34+
LINK_LIBRARIES
35+
getopt
36+
cpp-testing-unittest_main
37+
LABELS
38+
unit
39+
)
40+
41+
add_ydb_test(NAME getopt-posix_getopt_ut
42+
SOURCES
43+
posix_getopt_ut.cpp
44+
LINK_LIBRARIES
45+
getopt
46+
cpp-testing-unittest_main
47+
LABELS
48+
unit
49+
)
50+
51+
add_ydb_test(NAME getopt-wrap_ut
52+
SOURCES
53+
wrap.cpp
54+
LINK_LIBRARIES
55+
getopt-small
56+
cpp-testing-unittest_main
57+
LABELS
58+
unit
59+
)
60+
61+
add_ydb_test(NAME getopt-ygetopt_ut
62+
SOURCES
63+
ygetopt_ut.cpp
64+
LINK_LIBRARIES
65+
getopt
66+
cpp-testing-unittest_main
67+
LABELS
68+
unit
69+
)

library/cpp/http/fetch/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME http-fetch-httpfsm_ut
3+
SOURCES
4+
httpfsm_ut.cpp
5+
LINK_LIBRARIES
6+
http-fetch
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
12+
add_ydb_test(NAME http-fetch-httpparser_ut
13+
SOURCES
14+
httpparser_ut.cpp
15+
LINK_LIBRARIES
16+
http-fetch
17+
cpp-testing-unittest_main
18+
LABELS
19+
unit
20+
)
21+
endif(YDB_SDK_TESTS)
22+
123
_ydb_sdk_add_library(http-fetch)
224

325
target_link_libraries(http-fetch

library/cpp/http/io/CMakeLists.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME http-io-chunk_ut
3+
SOURCES
4+
chunk_ut.cpp
5+
LINK_LIBRARIES
6+
http-io
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
12+
add_ydb_test(NAME http-io-compression_ut
13+
SOURCES
14+
compression_ut.cpp
15+
LINK_LIBRARIES
16+
http-io
17+
cpp-testing-unittest_main
18+
LABELS
19+
unit
20+
)
21+
22+
add_ydb_test(NAME http-io-headers_ut
23+
SOURCES
24+
headers_ut.cpp
25+
LINK_LIBRARIES
26+
http-io
27+
cpp-testing-unittest_main
28+
LABELS
29+
unit
30+
)
31+
32+
add_ydb_test(NAME http-io-stream_ut
33+
SOURCES
34+
stream_ut.cpp
35+
LINK_LIBRARIES
36+
yutil
37+
http-io
38+
http-server
39+
cpp-testing-unittest_main
40+
LABELS
41+
unit
42+
)
43+
44+
add_ydb_test(NAME http-io-stream_ut_medium
45+
SOURCES
46+
stream_ut_medium.cpp
47+
LINK_LIBRARIES
48+
http-io
49+
cpp-testing-unittest_main
50+
LABELS
51+
unit
52+
)
53+
endif(YDB_SDK_TESTS)
54+
155
_ydb_sdk_add_library(http-io)
256

357
target_link_libraries(http-io

library/cpp/http/misc/CMakeLists.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME http-misc-httpdate_ut
3+
SOURCES
4+
httpdate_ut.cpp
5+
LINK_LIBRARIES
6+
http-misc
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
12+
add_ydb_test(NAME http-misc-httpreqdata_ut
13+
SOURCES
14+
httpreqdata_ut.cpp
15+
LINK_LIBRARIES
16+
http-misc
17+
cpp-testing-unittest_main
18+
LABELS
19+
unit
20+
)
21+
22+
add_ydb_test(NAME http-misc-parsed_request_ut
23+
SOURCES
24+
parsed_request_ut.cpp
25+
LINK_LIBRARIES
26+
http-misc
27+
cpp-testing-unittest_main
28+
LABELS
29+
unit
30+
)
31+
endif(YDB_SDK_TESTS)
32+
133
_ydb_sdk_add_library(http-misc)
234

335
target_link_libraries(http-misc

library/cpp/lcs/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME lcs-lcs_via_lis_ut
3+
SOURCES
4+
lcs_via_lis_ut.cpp
5+
LINK_LIBRARIES
6+
lcs
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(lcs)
214

315
target_link_libraries(lcs

library/cpp/streams/brotli/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME streams-brotli-ut
3+
SOURCES
4+
brotli_ut.cpp
5+
LINK_LIBRARIES
6+
streams-brotli
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(streams-brotli)
214

315
target_link_libraries(streams-brotli

library/cpp/streams/bzip2/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME streams-bzip2-ut
3+
SOURCES
4+
bzip2_ut.cpp
5+
LINK_LIBRARIES
6+
streams-bzip2
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(streams-bzip2)
214

315
target_link_libraries(streams-bzip2

library/cpp/streams/zstd/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME streams-zstd-ut
3+
SOURCES
4+
zstd_ut.cpp
5+
LINK_LIBRARIES
6+
streams-zstd
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(streams-zstd)
214
target_link_libraries(streams-zstd
315
PUBLIC

library/cpp/string_utils/quote/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME string_utils-quote-ut
3+
SOURCES
4+
quote_ut.cpp
5+
LINK_LIBRARIES
6+
string_utils-quote
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(string_utils-quote)
214

3-
target_link_libraries(string_utils-quote
15+
target_link_libraries(string_utils-quote
416
PUBLIC
517
yutil
618
)

library/cpp/string_utils/relaxed_escaper/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME string_utils-relaxed_escaper-ut
3+
SOURCES
4+
relaxed_escaper_ut.cpp
5+
LINK_LIBRARIES
6+
string_utils-relaxed_escaper
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(string_utils-relaxed_escaper)
214

315
target_link_libraries(string_utils-relaxed_escaper

library/cpp/string_utils/url/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME string_utils-url-ut
3+
SOURCES
4+
url_ut.cpp
5+
LINK_LIBRARIES
6+
string_utils-url
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(string_utils-url)
214

315
target_link_libraries(string_utils-url

library/cpp/threading/chunk_queue/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
if (YDB_SDK_TESTS)
2+
add_ydb_test(NAME threading-chunk_queue-ut
3+
SOURCES
4+
queue_ut.cpp
5+
LINK_LIBRARIES
6+
threading-chunk_queue
7+
cpp-testing-unittest_main
8+
LABELS
9+
unit
10+
)
11+
endif()
12+
113
_ydb_sdk_add_library(threading-chunk_queue)
214

315
target_link_libraries(threading-chunk_queue PUBLIC

library/cpp/threading/light_rw_lock/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if (YDB_SDK_TESTS)
2+
add_subdirectory(ut)
3+
endif()
4+
15
_ydb_sdk_add_library(threading-light_rw_lock)
26

37
target_link_libraries(threading-light_rw_lock PUBLIC
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
add_ydb_test(NAME threading-light_rw_lock-ut
2+
SOURCES
3+
rwlock_ut.cpp
4+
LINK_LIBRARIES
5+
threading-light_rw_lock
6+
cpp-testing-unittest_main
7+
LABELS
8+
unit
9+
)

library/cpp/unicode/normalization/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if (YDB_SDK_TESTS)
2+
add_subdirectory(ut)
3+
endif()
4+
15
_ydb_sdk_add_library(unicode-normalization)
26

37
target_link_libraries(unicode-normalization PUBLIC
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
add_ydb_test(NAME unicode-normalization-ut
2+
SOURCES
3+
normalization_ut.cpp
4+
LINK_LIBRARIES
5+
unicode-normalization
6+
cpp-testing-unittest_main
7+
LABELS
8+
unit
9+
)

0 commit comments

Comments
 (0)