Fixed missing normalization step of arguments to imply statements and extended test to cover the issue.
This commit is contained in:
parent
23e851ccef
commit
63de1891af
@ -33,6 +33,11 @@ ExpressionPointer Imply::normalize()
|
||||
orExpression->addArgument(std::move(notArgument0));
|
||||
orExpression->addArgument(std::move(m_argumentStorage[1]));
|
||||
|
||||
auto normalizedOrExpression = orExpression->normalize();
|
||||
|
||||
if (normalizedOrExpression)
|
||||
return normalizedOrExpression;
|
||||
|
||||
return std::move(orExpression);
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,8 @@ TEST(PDDLNormalizationTests, Implication)
|
||||
|
||||
ASSERT_EQ(n.argument(), d1p);
|
||||
ASSERT_EQ(o.arguments()[1], d2p);
|
||||
ASSERT_TRUE(d1p->isNormalized());
|
||||
ASSERT_TRUE(d2p->isNormalized());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user