Throwing exceptions for unsupported features instead of silently accepting them.

This commit is contained in:
2017-06-24 20:27:01 +02:00
parent 2b0b6570ea
commit ca02b8ce62
19 changed files with 86 additions and 168 deletions

View File

@@ -16,26 +16,26 @@ TEST_CASE("[PDDL parser issues] Check past issues", "[PDDL parser issues]")
pddl::Tokenizer tokenizer;
pddl::Context context(std::move(tokenizer), ignoreWarnings);
SECTION("white space issues with constants and parsing unsupported sections")
/*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")
/*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")
/*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
SECTION("“either” in typing section")

View File

@@ -186,7 +186,7 @@ TEST_CASE("[PDDL instances] The official PDDL instances are parsed correctly", "
CHECK(goal2->arguments[1].get<pddl::ast::ConstantPointer>()->declaration->type.value().get<pddl::ast::PrimitiveTypePointer>()->declaration == typeBlock.get());
}
SECTION("“either” type in zenotravel domain")
/*SECTION("“either” type in zenotravel domain")
{
context.mode = pddl::Mode::Compatibility;
@@ -206,7 +206,7 @@ TEST_CASE("[PDDL instances] The official PDDL instances are parsed correctly", "
REQUIRE(predicates[0]->parameters[1]->name == "c");
REQUIRE(predicates[0]->parameters[1]->type);
CHECK(predicates[0]->parameters[1]->type.value().get<pddl::ast::PrimitiveTypePointer>()->declaration->name == "city");
}
}*/
SECTION("typed constants in schedule domain")
{