Added tests covering completion of integrity constraints and facts.
This commit is contained in:
parent
350f31d0fd
commit
a1648e27c9
@ -47,4 +47,22 @@ TEST_CASE("[completion] Rules are completed", "[completion]")
|
||||
|
||||
REQUIRE(output.str() == "(p <-> (s or q))\n(q <-> (t or r))\n(r <-> t)\n");
|
||||
}
|
||||
|
||||
SECTION("integrity constraints")
|
||||
{
|
||||
input << ":- q.\n"
|
||||
":- s(5).";
|
||||
anthem::translate("input", input, context);
|
||||
|
||||
REQUIRE(output.str() == "not q\nnot s(5)\n");
|
||||
}
|
||||
|
||||
SECTION("facts")
|
||||
{
|
||||
input << "q.\n"
|
||||
"r.";
|
||||
anthem::translate("input", input, context);
|
||||
|
||||
REQUIRE(output.str() == "(q <-> #true)\n(r <-> #true)\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user