Skip to content

Commit

Permalink
Fix anomalies reporting in dump comparisons (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keryan-dev authored Jun 1, 2023
2 parents fab6de7 + 7ee593b commit e1d0016
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/dgfip_c/ml_primitif/ml_driver/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ let compare_dump out outexp =
let rec read_strings ic strs =
try
let str = read64 ic in
StrSet.add (Bytes.to_string str) strs
let strs = StrSet.add (Bytes.to_string str) strs in
read_strings ic strs
with
| End_of_file -> strs
in
Expand All @@ -111,10 +112,11 @@ let compare_dump out outexp =
else string_of_float(Int64.float_of_bits i64)
in
List.iter (fun (var, res, exp) ->
Printf.eprintf "%s: %s found, expected %s\n%!"
Printf.eprintf "%s: %s found, expected %s\n"
var (hex2floatstr res) (hex2floatstr exp)
)
diffs;
flush stderr;
close_in out;
close_in outexp

Expand Down

0 comments on commit e1d0016

Please sign in to comment.