💄 fixed indentation
This commit is contained in:
parent
472d0045ba
commit
c39c36e6ad
1 changed files with 14 additions and 14 deletions
|
@ -495,19 +495,19 @@ TEST_CASE("regression tests")
|
||||||
json j = json::parse("22e2222");
|
json j = json::parse("22e2222");
|
||||||
CHECK(j == json());
|
CHECK(j == json());
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("issue #367 - calling stream at EOF")
|
|
||||||
{
|
|
||||||
std::stringstream ss;
|
|
||||||
json j;
|
|
||||||
ss << "123";
|
|
||||||
CHECK_NOTHROW(j << ss);
|
|
||||||
|
|
||||||
// see https://github.com/nlohmann/json/issues/367#issuecomment-262841893:
|
SECTION("issue #367 - calling stream at EOF")
|
||||||
// ss is not at EOF; this yielded an error before the fix
|
{
|
||||||
// (threw basic_string::append). No, it should just throw
|
std::stringstream ss;
|
||||||
// a parse error because of the EOF.
|
json j;
|
||||||
CHECK_THROWS_AS(j << ss, std::invalid_argument);
|
ss << "123";
|
||||||
CHECK_THROWS_WITH(j << ss, "parse error - unexpected end of input");
|
CHECK_NOTHROW(j << ss);
|
||||||
}
|
|
||||||
|
// see https://github.com/nlohmann/json/issues/367#issuecomment-262841893:
|
||||||
|
// ss is not at EOF; this yielded an error before the fix
|
||||||
|
// (threw basic_string::append). No, it should just throw
|
||||||
|
// a parse error because of the EOF.
|
||||||
|
CHECK_THROWS_AS(j << ss, std::invalid_argument);
|
||||||
|
CHECK_THROWS_WITH(j << ss, "parse error - unexpected end of input");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue