Added test covering SAS feature requirements.
This commit is contained in:
parent
ee0b446230
commit
430bedc2cc
@ -14,6 +14,7 @@ class SASParserTests : public ::testing::Test
|
||||
protected:
|
||||
SASParserTests()
|
||||
: m_blocksworldTestFile(readFile("data/blocksworld.sas")),
|
||||
m_cavedivingTestFile(readFile("data/cavediving.sas")),
|
||||
m_freecellTestFile(readFile("data/freecell.sas")),
|
||||
m_philosophersTestFile(readFile("data/philosophers.sas"))
|
||||
{
|
||||
@ -34,6 +35,7 @@ class SASParserTests : public ::testing::Test
|
||||
}
|
||||
|
||||
std::stringstream m_blocksworldTestFile;
|
||||
std::stringstream m_cavedivingTestFile;
|
||||
std::stringstream m_freecellTestFile;
|
||||
std::stringstream m_philosophersTestFile;
|
||||
};
|
||||
@ -148,6 +150,24 @@ TEST_F(SASParserTests, ParseNoneValue)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_F(SASParserTests, ParseRequirements)
|
||||
{
|
||||
try
|
||||
{
|
||||
const auto description = plasp::sas::Description::fromStream(m_cavedivingTestFile);
|
||||
|
||||
ASSERT_TRUE(description.usesActionCosts());
|
||||
ASSERT_TRUE(description.usesConditionalEffects());
|
||||
ASSERT_FALSE(description.usesAxiomRules());
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
FAIL() << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
5465
tests/data/cavediving.sas
Normal file
5465
tests/data/cavediving.sas
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user