Added test for removal of trailing parantheses with 0-ary predicates.
This commit is contained in:
@@ -13,7 +13,8 @@ class SASParserTests : public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
SASParserTests()
|
||||
: m_philosophersTestFile(readFile("data/philosophers.sas"))
|
||||
: m_blocksworldTestFile(readFile("data/blocksworld.sas")),
|
||||
m_philosophersTestFile(readFile("data/philosophers.sas"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -31,6 +32,7 @@ class SASParserTests : public ::testing::Test
|
||||
return outputStream;
|
||||
}
|
||||
|
||||
std::stringstream m_blocksworldTestFile;
|
||||
std::stringstream m_philosophersTestFile;
|
||||
};
|
||||
|
||||
@@ -109,6 +111,23 @@ TEST_F(SASParserTests, ParseValidSASFile)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_F(SASParserTests, RemoveTrailingParentheses)
|
||||
{
|
||||
try
|
||||
{
|
||||
const auto description = plasp::sas::Description::fromStream(m_blocksworldTestFile);
|
||||
|
||||
ASSERT_EQ(description.variables()[4].values()[0].name(), "handempty");
|
||||
ASSERT_EQ(description.variables()[5].values()[0].name(), "holding(a)");
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
FAIL () << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
Reference in New Issue
Block a user