File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/cdomain/value/cdomains Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,9 @@ module FloatIntervalImpl(Float_t : CFloatType) = struct
220220 | _ -> Top
221221
222222 (* *for QCheck: should describe how to generate random values and shrink possible counter examples *)
223- let arbitrary () = QCheck. map convert_arb (QCheck. option (QCheck. pair QCheck. float QCheck. float ))
223+ let arbitrary () =
224+ let gen = QCheck. map convert_arb (QCheck. option (QCheck. pair QCheck. float QCheck. float )) in
225+ QCheck. set_print show gen
224226
225227 let of_interval' interval =
226228 let x = norm @@ Interval interval
Original file line number Diff line number Diff line change @@ -265,7 +265,10 @@ struct
265265
266266 let test_FI_div_zero_result_top =
267267 QCheck.Test. make ~name: " test_FI_div_zero_result_top" (FI. arbitrary () ) (fun arg ->
268- FI. is_top (FI. div arg (FI. of_const 0. )))
268+ let res = FI. div arg (FI. of_const 0. ) in
269+ if FI. equal arg fi_zero
270+ then FI. equal res (FI. nan () )
271+ else FI. is_top res)
269272
270273 let test_FI_accurate_neg =
271274 QCheck.Test. make ~name: " test_FI_accurate_neg" QCheck. float (fun arg ->
You can’t perform that action at this time.
0 commit comments