Unverified Commit 95432c34 authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #1262 from knilch0r/patch-1

unit-testsuites.cpp: fix hangup if file not found
parents 680a4ab6 8c1387cf
......@@ -1346,13 +1346,11 @@ TEST_CASE("Big List of Naughty Strings")
SECTION("roundtripping")
{
std::ifstream f("test/data/big-list-of-naughty-strings/blns.json");
std::string line;
while (not f.eof())
// read lines one by one, bail out on error or eof
while (getline(f, line))
{
// read line
std::string line;
getline(f, line);
// trim whitespace
line = trim(line);
......
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