Added unit test for the completion of predicates with nested arguments.

This commit is contained in:
Patrick Lühne 2017-06-12 15:32:05 +02:00
parent d7641aa410
commit 7665cb7bf1
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -115,6 +115,17 @@ TEST_CASE("[completion] Rules are completed", "[completion]")
"t\n");
}
SECTION("nested arguments")
{
input <<
"f(f(f(f(f(X))))) :- f(X).\n"
"f(1..5).";
anthem::translate("input", input, context);
CHECK(output.str() ==
"forall V1 (f(V1) <-> (exists U1 (V1 = f(f(f(f(U1)))) and f(U1)) or V1 in 1..5))\n");
}
SECTION("useless implications")
{
input <<