Replicated test cases for former issues in PDDL parsing library.

This commit is contained in:
Patrick Lühne 2017-06-19 01:15:20 +02:00
parent c35faab104
commit 799c9ce2fb
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -16,6 +16,27 @@ TEST_CASE("[PDDL parser issues] Check past issues", "[PDDL parser issues]")
pddl::Tokenizer tokenizer; pddl::Tokenizer tokenizer;
pddl::Context context(std::move(tokenizer), ignoreWarnings); pddl::Context context(std::move(tokenizer), ignoreWarnings);
SECTION("white space issues with constants and parsing unsupported sections")
{
const auto domainFile = fs::path("data") / "issues" / "issue-1.pddl";
context.tokenizer.read(domainFile);
CHECK_NOTHROW(pddl::parseDescription(context));
}
SECTION("white space issues with empty n-ary predicates")
{
const auto domainFile = fs::path("data") / "issues" / "issue-2.pddl";
context.tokenizer.read(domainFile);
CHECK_NOTHROW(pddl::parseDescription(context));
}
SECTION("comments are correctly ignored")
{
const auto domainFile = fs::path("data") / "issues" / "issue-3.pddl";
context.tokenizer.read(domainFile);
CHECK_NOTHROW(pddl::parseDescription(context));
}
// Check that no infinite loop occurs // Check that no infinite loop occurs
SECTION("“either” in typing section") SECTION("“either” in typing section")
{ {