Skip to content

Commit b3d535b

Browse files
committed
json_conv_traits map
1 parent b4a143e commit b3d535b

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ add_executable(unit_tests
147147
corelib/src/utility/read_number_tests.cpp
148148
corelib/src/utility/unicode_conv_tests.cpp
149149
corelib/src/utility/uri_tests.cpp
150-
corelib/src/value_converter_tests.cpp
150+
corelib/src/conversion_tests.cpp
151151
corelib/src/wjson_tests.cpp
152152
csv/src/csv_cursor_tests.cpp
153153
csv/src/csv_reader_tests.cpp

test/corelib/src/value_converter_tests.cpp renamed to test/corelib/src/conversion_tests.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,19 @@ TEST_CASE("convert into string")
1414

1515
SECTION("from byte_string into string")
1616
{
17-
value_converter<byte_string_view,std::string> converter;
18-
1917
std::string expected = "Zm9vYmFy";
2018

21-
std::error_code ec;
22-
std::string s = converter.convert(byte_string_view(bytes), semantic_tag::base64url, ec);
23-
REQUIRE(!ec);
19+
std::string s;
20+
bytes_to_string(bytes.begin(), bytes.end(), semantic_tag::base64url, s);
2421

2522
CHECK(expected == s);
2623
}
2724
SECTION("from byte string into wstring")
2825
{
29-
value_converter<byte_string_view,std::wstring> converter;
30-
3126
std::wstring expected = L"Zm9vYmFy";
3227

33-
std::error_code ec;
34-
std::wstring s = converter.convert(byte_string_view(bytes), semantic_tag::base64url, ec);
35-
REQUIRE(!ec);
28+
std::wstring s;
29+
bytes_to_string(bytes.begin(), bytes.end(), semantic_tag::base64url, s);
3630

3731
CHECK(expected == s);
3832
}

0 commit comments

Comments
 (0)