Skip to content

Commit 62af5c0

Browse files
authored
Add tests reported in Github issues. (#1001)
* Add tests reported in Github issues. * Fix lying ampersand comment. * Fix missing string escape.
1 parent 452afce commit 62af5c0

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

Release/src/uri/uri.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace
127127
/// - The percent character ('%'), and thus any percent-endcoded octet
128128
/// - The sub-delimiters
129129
/// - ':' (colon)
130-
/// - '@' (ampersand)
130+
/// - '@' (at sign)
131131
/// </summary>
132132
inline bool is_path_character(int c)
133133
{

Release/tests/functional/json/construction_tests.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ TEST(object_construction)
211211
f.push_back(std::make_pair(U("abc"), json::value(true)));
212212
f.push_back(std::make_pair(U("xyz"), json::value(44)));
213213
json::value obj = json::value::object(f);
214-
214+
215215
VERIFY_ARE_EQUAL(f.size(), obj.size());
216216

217217
obj[U("abc")] = json::value::string(U("str"));
@@ -320,7 +320,7 @@ TEST(array_construction)
320320
TEST(array_test)
321321
{
322322
json::value arr = json::value::array();
323-
const json::value& carr = arr;
323+
const json::value& carr = arr;
324324
arr[0] = json::value(3.14);
325325
arr[1] = json::value(true);
326326
arr[2] = json::value("Yes");
@@ -486,7 +486,11 @@ TEST(object_test)
486486
VERIFY_ARE_EQUAL(cobject.size(), count);
487487
}
488488

489+
TEST(github_asan_989)
490+
{
491+
::web::json::value::parse( _XPLATSTR(R"([ { "k1" : "v" }, { "k2" : "v" }, { "k3" : "v" }, { "k4" : "v" } ])") );
492+
}
493+
489494
} // SUITE(construction_tests)
490495

491496
}}}
492-

Release/tests/functional/uri/uri_builder_tests.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@ TEST(append_query_locale, "Ignore:Android", "Locale unsupported on Android")
572572
VERIFY_ARE_EQUAL(expected, builder.query());
573573
}
574574

575+
TEST(github_crash_994)
576+
{
577+
web::uri uri(U("http://127.0.0.1:34568/"));
578+
}
579+
575580
} // SUITE(uri_builder_tests)
576581

577582
}}}

0 commit comments

Comments
 (0)