Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Adda0 committed Nov 28, 2022
1 parent 8b253f3 commit 9381241
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/noodler/inclusion-graph-node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ TEST_CASE( "Inclusion graph node", "[noodler]" ) {
TEST_CASE("Conversion to strings") {
CHECK(smt::noodler::to_string(BasicTermType::Literal) == "Literal");
CHECK(smt::noodler::to_string(BasicTermType::Variable) == "Variable");
CHECK(BasicTerm{ BasicTermType::Literal }.to_string() == "(Literal)");
CHECK(BasicTerm{ BasicTermType::Literal, "4" }.to_string() == "\"4\" (Literal)");
CHECK(BasicTerm{ BasicTermType::Variable, "x_42" }.to_string() == "x_42 (Variable)");
CHECK(BasicTerm{ BasicTermType::Literal }.to_string().empty());
CHECK(BasicTerm{ BasicTermType::Literal, "4" }.to_string() == "\"4\"");
CHECK(BasicTerm{ BasicTermType::Variable, "x_42" }.to_string() == "x_42");

auto pred{ Predicate{ PredicateType::Equation, {
{ { BasicTermType::Literal, "4" }, { BasicTermType::Variable, "x_42" } } ,
{ { BasicTermType::Variable, "xyz" }, { BasicTermType::Variable, "y_58" } },
} } };

CHECK(pred.to_string() == "Equation: . \"4\" (Literal) . x_42 (Variable) = . xyz (Variable) . y_58 (Variable)");
CHECK(pred.to_string() == "Equation: \"4\" x_42 = xyz y_58");

auto pred_ineq{ Predicate{ PredicateType::Inequation, {
{ { BasicTermType::Literal, "4" }, { BasicTermType::Variable, "x_42" } } ,
{ { BasicTermType::Variable, "xyz" }, { BasicTermType::Variable, "y_58" } },
} } };

CHECK(pred_ineq.to_string() == "Inequation: . \"4\" (Literal) . x_42 (Variable) != . xyz (Variable) . y_58 (Variable)");
CHECK(pred_ineq.to_string() == "Inequation: \"4\" x_42 != xyz y_58");
}

TEST_CASE("Integration of inclusion graph") {
Expand Down

0 comments on commit 9381241

Please sign in to comment.