Fix infinite loop when encountering unexpected test specifications

This commit is contained in:
Mathias Baumann
2019-04-11 13:37:42 +02:00
parent bf653b004e
commit 71d752d878
2 changed files with 13 additions and 0 deletions
@@ -775,6 +775,14 @@ BOOST_AUTO_TEST_CASE(call_arrow_missing)
BOOST_REQUIRE_THROW(parse(source), langutil::Error);
}
BOOST_AUTO_TEST_CASE(call_unexpected_character)
{
char const* source = R"(
// f() -> ??
)";
BOOST_REQUIRE_THROW(parse(source), langutil::Error);
}
BOOST_AUTO_TEST_SUITE_END()
}