🐛 parsing erroneous files yields an exception (#366)
This commit is contained in:
1 parent
ed611119d9
commit
4bb41d065b
3 files changed
+18
No files matched your search
@@ -495,4 +495,10 @@ TEST_CASE("regression tests")
|
||||
json j = json::parse("22e2222");
|
||||
CHECK(j == json());
|
||||
}
|
||||
|
||||
SECTION("issue #366 - json::parse on failed stream gets stuck")
|
||||
{
|
||||
std::ifstream f("file_not_found.json");
|
||||
CHECK_THROWS_AS(json::parse(f), std::invalid_argument);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user