Unverified Commit d3caf93a authored by Francois Chabot's avatar Francois Chabot Committed by GitHub

Merge branch 'develop' into 1813-user-input

parents bfcd32c0 9ec0e4c2
...@@ -148,7 +148,7 @@ Example: ...@@ -148,7 +148,7 @@ Example:
include(FetchContent) include(FetchContent)
FetchContent_Declare(json FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.7.3) GIT_TAG v3.7.3)
FetchContent_GetProperties(json) FetchContent_GetProperties(json)
......
...@@ -1890,6 +1890,28 @@ TEST_CASE("regression tests") ...@@ -1890,6 +1890,28 @@ TEST_CASE("regression tests")
json j = val; json j = val;
} }
SECTION("issue #1715 - json::from_cbor does not respect allow_exceptions = false when input is string literal")
{
SECTION("string literal")
{
json cbor = json::from_cbor("B", true, false);
CHECK(cbor.is_discarded());
}
SECTION("string array")
{
const char input[] = { 'B', 0x00 };
json cbor = json::from_cbor(input, true, false);
CHECK(cbor.is_discarded());
}
SECTION("std::string")
{
json cbor = json::from_cbor(std::string("B"), true, false);
CHECK(cbor.is_discarded());
}
}
SECTION("issue #1805 - A pair<T1, T2> is json constructible only if T1 and T2 are json constructible") SECTION("issue #1805 - A pair<T1, T2> is json constructible only if T1 and T2 are json constructible")
{ {
static_assert(!std::is_constructible<json, std::pair<std::string, NotSerializableData>>::value, ""); static_assert(!std::is_constructible<json, std::pair<std::string, NotSerializableData>>::value, "");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment