Skip to content

Commit 82ce660

Browse files
authored
190 Fix src/library/json tests (2.0) (#250)
1 parent daf3535 commit 82ce660

File tree

13 files changed

+169
-139
lines changed

13 files changed

+169
-139
lines changed

src/library/json/fuzzy_test/main.cpp

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

src/library/json/fuzzy_test/ya.make

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

src/library/json/ut/ya.make

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

tests/library/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
add_subdirectory(cache)
22
add_subdirectory(case_insensitive_string)
33
add_subdirectory(coroutine)
4+
add_subdirectory(json)
45
add_subdirectory(login)
56
add_subdirectory(operation_id)
67
add_subdirectory(testing)

tests/library/json/CMakeLists.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
add_subdirectory(writer)
2+
3+
add_ydb_test(NAME json-ut-json_prettifier_ut
4+
SOURCES
5+
json_prettifier_ut.cpp
6+
INCLUDE_DIRS
7+
${YDB_SDK_SOURCE_DIR}/src/library/json
8+
${YDB_SDK_SOURCE_DIR}/src/library/testing/unittest
9+
LINK_LIBRARIES
10+
yutil
11+
cpp-testing-unittest_main
12+
library-cpp-json
13+
)
14+
15+
add_ydb_test(NAME json-ut-json_reader_fast_ut
16+
SOURCES
17+
json_reader_fast_ut.cpp
18+
INCLUDE_DIRS
19+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/library/json
20+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/util/string
21+
${YDB_SDK_SOURCE_DIR}/src/library/json
22+
${YDB_SDK_SOURCE_DIR}/src/library/testing/unittest
23+
${YDB_SDK_SOURCE_DIR}/src/library/string_utils/relaxed_escaper
24+
LINK_LIBRARIES
25+
yutil
26+
cpp-testing-unittest_main
27+
library-cpp-json
28+
)
29+
30+
add_ydb_test(NAME json-ut-json_reader_ut
31+
SOURCES
32+
json_reader_ut.cpp
33+
INCLUDE_DIRS
34+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/library/json
35+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/util/stream
36+
${YDB_SDK_SOURCE_DIR}/src/library/json
37+
${YDB_SDK_SOURCE_DIR}/src/library/testing/unittest
38+
LINK_LIBRARIES
39+
yutil
40+
cpp-testing-unittest_main
41+
library-cpp-json
42+
)
43+
44+
add_ydb_test(NAME json-ut-json_saveload_ut
45+
SOURCES
46+
json_saveload_ut.cpp
47+
INCLUDE_DIRS
48+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/library/json
49+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/util
50+
${YDB_SDK_SOURCE_DIR}/src/library/testing/unittest
51+
${YDB_SDK_SOURCE_DIR}/src/util/stream
52+
LINK_LIBRARIES
53+
yutil
54+
cpp-testing-unittest_main
55+
library-cpp-json
56+
)
57+
58+
add_ydb_test(NAME json-ut-json_writer_ut
59+
SOURCES
60+
json_writer_ut.cpp
61+
INCLUDE_DIRS
62+
${YDB_SDK_SOURCE_DIR}/include/ydb-cpp-sdk/util/stream
63+
${YDB_SDK_SOURCE_DIR}/src/library/json
64+
${YDB_SDK_SOURCE_DIR}/src/library/testing/unittest
65+
LINK_LIBRARIES
66+
yutil
67+
cpp-testing-unittest_main
68+
library-cpp-json
69+
)

src/library/json/ut/json_prettifier_ut.cpp renamed to tests/library/json/json_prettifier_ut.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <src/library/json/json_prettifier.h>
1+
#include "json_prettifier.h"
22

3-
#include <src/library/testing/unittest/registar.h>
3+
#include "registar.h"
44

55
Y_UNIT_TEST_SUITE(JsonPrettifier) {
66
Y_UNIT_TEST(PrettifyJsonShort) {

src/library/json/ut/json_reader_fast_ut.cpp renamed to tests/library/json/json_reader_fast_ut.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#include <ydb-cpp-sdk/library/json/json_reader.h>
2-
#include <src/library/json/json_prettifier.h>
3-
#include <src/library/testing/unittest/registar.h>
1+
#include "json_reader.h"
2+
#include "json_prettifier.h"
3+
#include "registar.h"
44

5-
#include <src/library/string_utils/relaxed_escaper/relaxed_escaper.h>
6-
#include <ydb-cpp-sdk/util/string/cast.h>
5+
#include "relaxed_escaper.h"
6+
#include "cast.h"
77

88
#include <iostream>
99

0 commit comments

Comments
 (0)