removed zero-length-array tests from msvc build

This commit is contained in:
Francois Chabot 2019-01-27 13:05:12 -05:00
parent 87ec44b0c4
commit 86838c95dc
2 changed files with 6 additions and 1 deletions

View File

@ -1645,13 +1645,15 @@ TEST_CASE("parser class")
CHECK(j == json(true));
}
// MSVC does not support zero-sized arrays at all
#if !defined(_MSC_VER)
SECTION("from zero-length array")
{
uint8_t v[] = {};
json j;
CHECK_THROWS_AS(json::parser(nlohmann::detail::input_adapter(v)).parse(true, j), json::parse_error&);
}
#endif
SECTION("from char literal")
{

View File

@ -393,6 +393,8 @@ TEST_CASE("deserialization")
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")
{
uint8_t v[] = {};
@ -404,6 +406,7 @@ TEST_CASE("deserialization")
CHECK(l.events.size() == 1);
CHECK(l.events == std::vector<std::string>({"parse_error(1)"}));
}
#endif
SECTION("from chars")
{