CVC5_API_TRY_CATCH_BEGIN;
CVC5_API_SOLVER_CHECK_TERM(term);
//////// all checks before this line
- return Term(this, d_slv->simplify(*term.d_node));
+ Term res = Term(this, d_slv->simplify(*term.d_node));
+ Assert(res.getSort().d_type->isSubtypeOf(*term.getSort().d_type));
+ return res;
////////
CVC5_API_TRY_CATCH_END;
}
// the query has free variables, and should throw an exception
ASSERT_THROW(slv.checkSatAssuming({t1073, t510}), CVC5ApiException);
}
-
+
TEST_F(TestApiBlackSolver, proj_issue436)
{
Solver slv;
// solve-bv-as-int is incompatible with get-abduct
ASSERT_THROW(slv.getAbduct(t33), CVC5ApiException);
}
-
+
TEST_F(TestApiBlackSolver, proj_issue431)
{
Solver slv;
abduct = slv.getAbduct(t488);
}
+TEST_F(TestApiBlackSolver, projIssue337)
+{
+ Term t =
+ d_solver.mkTerm(SEQ_UNIT, d_solver.mkReal("3416574625719121610379268"));
+ Term tt = d_solver.simplify(t);
+ ASSERT_EQ(t.getSort(), tt.getSort());
+}
+
} // namespace test
} // namespace cvc5