Sectioning unit tests for meaningful error messages.
This commit is contained in:
parent
c84cafda18
commit
de69003105
@ -26,11 +26,17 @@ TEST_CASE("[PDDL parser acceptance] All official PDDL domains are parsed without
|
|||||||
|
|
||||||
const auto domainFile = domainDirectory / "domain.pddl";
|
const auto domainFile = domainDirectory / "domain.pddl";
|
||||||
|
|
||||||
pddl::Tokenizer tokenizer;
|
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
|
||||||
tokenizer.read(domainFile);
|
+ domainDirectory.path().stem().string();
|
||||||
pddl::Context context(std::move(tokenizer), ignoreWarnings);
|
|
||||||
|
|
||||||
CHECK_NOTHROW(pddl::parseDescription(context));
|
SECTION("domain [" + testSectionName + "]")
|
||||||
|
{
|
||||||
|
pddl::Tokenizer tokenizer;
|
||||||
|
tokenizer.read(domainFile);
|
||||||
|
pddl::Context context(std::move(tokenizer), ignoreWarnings);
|
||||||
|
|
||||||
|
CHECK_NOTHROW(pddl::parseDescription(context));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,12 +58,19 @@ 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";
|
||||||
|
|
||||||
pddl::Tokenizer tokenizer;
|
const auto testSectionName = competitionDirectory.path().stem().string() + ", "
|
||||||
tokenizer.read(domainFile);
|
+ domainDirectory.path().stem().string() + ", "
|
||||||
tokenizer.read(instanceFile);
|
+ instanceFile.stem().string();
|
||||||
pddl::Context context(std::move(tokenizer), ignoreWarnings);
|
|
||||||
|
|
||||||
CHECK_NOTHROW(pddl::parseDescription(context));
|
SECTION("instance [" + testSectionName + "]")
|
||||||
|
{
|
||||||
|
pddl::Tokenizer tokenizer;
|
||||||
|
tokenizer.read(domainFile);
|
||||||
|
tokenizer.read(instanceFile);
|
||||||
|
pddl::Context context(std::move(tokenizer), ignoreWarnings);
|
||||||
|
|
||||||
|
CHECK_NOTHROW(pddl::parseDescription(context));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user