Added unit test for intervals.
This commit is contained in:
parent
712530150f
commit
cff5ed8cec
@ -121,6 +121,14 @@ TEST_CASE("[translation] Rules are translated correctly", "[translation]")
|
||||
REQUIRE(output.str() == "V1 in X and V2 in (1,) and exists X1, X2 (X1 in X and X2 in (2,) and q(X1, X2)) -> p(V1, V2)\n");
|
||||
}
|
||||
|
||||
SECTION("intervals")
|
||||
{
|
||||
input << "p(X, 1..10) :- q(X, 6..12).";
|
||||
anthem::translate("input", input, context);
|
||||
|
||||
REQUIRE(output.str() == "V1 in X and V2 in (1..10) and exists X1, X2 (X1 in X and X2 in (6..12) and q(X1, X2)) -> p(V1, V2)\n");
|
||||
}
|
||||
|
||||
SECTION("single negation")
|
||||
{
|
||||
input << "not p(X, 1) :- not q(X, 2).";
|
||||
|
Loading…
Reference in New Issue
Block a user