Sectioning unit tests for meaningful error messages.

This commit is contained in:
Patrick Lühne 2017-06-17 17:07:09 +02:00
parent c84cafda18
commit de69003105
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -26,6 +26,11 @@ TEST_CASE("[PDDL parser acceptance] All official PDDL domains are parsed without
const auto domainFile = domainDirectory / "domain.pddl"; const auto domainFile = domainDirectory / "domain.pddl";
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
+ domainDirectory.path().stem().string();
SECTION("domain [" + testSectionName + "]")
{
pddl::Tokenizer tokenizer; pddl::Tokenizer tokenizer;
tokenizer.read(domainFile); tokenizer.read(domainFile);
pddl::Context context(std::move(tokenizer), ignoreWarnings); pddl::Context context(std::move(tokenizer), ignoreWarnings);
@ -34,6 +39,7 @@ TEST_CASE("[PDDL parser acceptance] All official PDDL domains are parsed without
} }
} }
} }
}
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
@ -52,6 +58,12 @@ TEST_CASE("[PDDL parser acceptance] The first instance for all official PDDL dom
const auto domainFile = domainDirectory / "domain.pddl"; const auto domainFile = domainDirectory / "domain.pddl";
const auto instanceFile = domainDirectory / "instances" / "instance-1.pddl"; const auto instanceFile = domainDirectory / "instances" / "instance-1.pddl";
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
+ domainDirectory.path().stem().string() + ", "
+ instanceFile.stem().string();
SECTION("instance [" + testSectionName + "]")
{
pddl::Tokenizer tokenizer; pddl::Tokenizer tokenizer;
tokenizer.read(domainFile); tokenizer.read(domainFile);
tokenizer.read(instanceFile); tokenizer.read(instanceFile);
@ -61,3 +73,4 @@ TEST_CASE("[PDDL parser acceptance] The first instance for all official PDDL dom
} }
} }
} }
}