Skip to content

Commit

Permalink
[Test] Add test for input dump
Browse files Browse the repository at this point in the history
  • Loading branch information
TDacik committed Jan 16, 2025
1 parent 78e4e0c commit a877ccd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/API_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ let check_sat_test2 () =
in
assert (not @@ Solver.check_sat solver phi)


let debug_input () =
let dirname = Format.asprintf "%s/_astral_test" (Filename.get_temp_dir_name ()) in
let solver = Solver.init ~dump_queries:(`Full dirname) () in
let phi = SL.emp in
let _ = Solver.check_sat solver phi in
assert (Sys.file_exists @@ dirname ^ "/query_0001/input.smt2")

let () =
run "API" [
"debug", [
test_case "input" `Quick debug_input;
];
"check_sat", [
test_case "sat" `Quick check_sat_test1;
test_case "unsat" `Quick check_sat_test2;
]]

]
]

0 comments on commit a877ccd

Please sign in to comment.