Merge pull request #1262 from knilch0r/patch-1
unit-testsuites.cpp: fix hangup if file not found
This commit is contained in:
commit
95432c34f9
1 changed files with 3 additions and 5 deletions
|
@ -1346,13 +1346,11 @@ TEST_CASE("Big List of Naughty Strings")
|
||||||
SECTION("roundtripping")
|
SECTION("roundtripping")
|
||||||
{
|
{
|
||||||
std::ifstream f("test/data/big-list-of-naughty-strings/blns.json");
|
std::ifstream f("test/data/big-list-of-naughty-strings/blns.json");
|
||||||
|
|
||||||
while (not f.eof())
|
|
||||||
{
|
|
||||||
// read line
|
|
||||||
std::string line;
|
std::string line;
|
||||||
getline(f, line);
|
|
||||||
|
|
||||||
|
// read lines one by one, bail out on error or eof
|
||||||
|
while (getline(f, line))
|
||||||
|
{
|
||||||
// trim whitespace
|
// trim whitespace
|
||||||
line = trim(line);
|
line = trim(line);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue