Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit a0febee2 authored by Sylvain Dailler's avatar Sylvain Dailler
Browse files

Improve counterexample interleaved with source.

parent 3ea32678
......@@ -465,12 +465,16 @@ let interleave_line
let model_elements = IntMap.find line_number model_file in
print_model_elements print_model_value_human me_name_trans str_formatter model_elements ~sep:"; ";
let cntexmp_line =
(get_padding line) ^
start_comment ^
(flush_str_formatter ()) ^
end_comment in
(get_padding line) ^ start_comment ^ (flush_str_formatter ()) ^ end_comment
in
(* We need to know how many lines will be taken by the counterexample. This
is ad hoc as we don't really know how the lines are split in IDE. *)
let len_cnt =
1 + (String.length cntexmp_line) / 80
in
(source_code ^ line ^ cntexmp_line ^ "\n", line_number + 1, offset + 1, remaining_locs, list_loc @ locs)
(source_code ^ line ^ cntexmp_line ^ "\n", line_number + 1, offset + len_cnt, remaining_locs, list_loc @ locs)
with Not_found ->
(source_code ^ line, line_number + 1, offset, remaining_locs, list_loc @ locs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment