From b15212cb550edc2be93a30062a28502b9994f9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Thu, 24 Nov 2016 15:58:59 +0100 Subject: [PATCH] Added unit tests for strings. --- tests/TestTranslation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/TestTranslation.cpp b/tests/TestTranslation.cpp index e80d23d..42a3050 100644 --- a/tests/TestTranslation.cpp +++ b/tests/TestTranslation.cpp @@ -96,4 +96,12 @@ TEST_CASE("[translation] Rules are translated correctly", "[translation]") REQUIRE(output.str() == "V1 in X and V2 in #inf and exists X1, X2 (X1 in X and X2 in #sup and q(X1, X2)) -> p(V1, V2)\n"); } + + SECTION("strings") + { + input << "p(X, \"foo\") :- q(X, \"bar\")."; + anthem::translate("input", input, context); + + REQUIRE(output.str() == "V1 in X and V2 in \"foo\" and exists X1, X2 (X1 in X and X2 in \"bar\" and q(X1, X2)) -> p(V1, V2)\n"); + } }