Skip to content

Commit

Permalink
chore: add warning for miss-matching expected result
Browse files Browse the repository at this point in the history
  • Loading branch information
TendTo committed Apr 3, 2024
1 parent 45e1af5 commit 5a94645
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dlinear/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "dlinear/solver/SmtSolverOutput.h"
#include "dlinear/util/ArgParser.h"
#include "dlinear/util/Config.h"
#include "dlinear/util/Timer.h"

namespace {
void HandleSigInt(const int) {
Expand All @@ -40,6 +39,10 @@ int main(int argc, const char* argv[]) {
// Run the solver
dlinear::SmtSolverOutput result = solver.CheckSat();
if (!config.silent()) std::cout << result << std::endl;
if (!config.silent() && config.complete() && solver.GetExpected() != dlinear::SolverResult::UNKNOWN &&
result.result != solver.GetExpected()) {
std::cerr << "WARNING: Expected " << solver.GetExpected() << " but got " << result.result << std::endl;
}

return result.exit_code();
}

0 comments on commit 5a94645

Please sign in to comment.