removed zero-length-array tests from msvc build
This commit is contained in:
parent
87ec44b0c4
commit
86838c95dc
@ -1645,13 +1645,15 @@ TEST_CASE("parser class")
|
|||||||
CHECK(j == json(true));
|
CHECK(j == json(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MSVC does not support zero-sized arrays at all
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
SECTION("from zero-length array")
|
SECTION("from zero-length array")
|
||||||
{
|
{
|
||||||
uint8_t v[] = {};
|
uint8_t v[] = {};
|
||||||
json j;
|
json j;
|
||||||
CHECK_THROWS_AS(json::parser(nlohmann::detail::input_adapter(v)).parse(true, j), json::parse_error&);
|
CHECK_THROWS_AS(json::parser(nlohmann::detail::input_adapter(v)).parse(true, j), json::parse_error&);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SECTION("from char literal")
|
SECTION("from char literal")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -393,6 +393,8 @@ TEST_CASE("deserialization")
|
|||||||
CHECK(l.events == std::vector<std::string>({"boolean(true)"}));
|
CHECK(l.events == std::vector<std::string>({"boolean(true)"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MSVC does not support zero-sized arrays at all
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
SECTION("from zero-length array")
|
SECTION("from zero-length array")
|
||||||
{
|
{
|
||||||
uint8_t v[] = {};
|
uint8_t v[] = {};
|
||||||
@ -404,6 +406,7 @@ TEST_CASE("deserialization")
|
|||||||
CHECK(l.events.size() == 1);
|
CHECK(l.events.size() == 1);
|
||||||
CHECK(l.events == std::vector<std::string>({"parse_error(1)"}));
|
CHECK(l.events == std::vector<std::string>({"parse_error(1)"}));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SECTION("from chars")
|
SECTION("from chars")
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user