Fixed incorrect output of functions and added unit test.

This commit is contained in:
2016-11-24 16:51:17 +01:00
parent 442fa8791a
commit 712530150f
2 changed files with 10 additions and 0 deletions

View File

@@ -180,6 +180,8 @@ ColorStream &operator<<(ColorStream &stream, const Clingo::AST::Function &functi
if (function.external)
stream << Operator("@");
stream << output::Function(function.name);
const auto postToken = (isUnaryTuple ? ",)" : ")");
printCollection(stream, function.arguments, "(", ", ", postToken, printIfEmpty);