package mutaml
A mutation tester for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
0.3.tar.gz
md5=bc941deaf1296d728b863bd3f60aa519
sha512=b9eaaf7310e5b8b779d91d641380fc519a741526fc2a9a66188b47c79b672501714deca0548fbe137ee02c6457a78a47405e435697520eef62fdd5bfbcdc0ee8
doc/src/mutaml.common/mutaml_common.ml.html
Source file mutaml_common.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
open Ppx_yojson_conv_lib.Yojson_conv.Primitives type defaults = { ppx_output_prefix : string; output_file_prefix : string; mutaml_mut_file : string; mutaml_report_file : string; } let defaults = { (* filenames to communicate through *) ppx_output_prefix = Filename.concat "_build" "default"; output_file_prefix = "_mutations"; mutaml_mut_file = "mutaml-mut-files.txt"; mutaml_report_file = "mutaml-report.json" } let full_ppx_path ppx_output_prefix fname = if Filename.is_implicit fname then Filename.concat ppx_output_prefix fname else fname let full_path fname = if Filename.is_implicit fname then Filename.concat defaults.output_file_prefix fname else fname let make_mut_id file_name number = Printf.sprintf "%s:%i" Filename.(remove_extension file_name) number let output_file_name file_name number = let file_name = Printf.sprintf "%s-mutant%i.output" file_name number in full_path file_name (* (String.map (function '/' -> '_' | c -> c) file_name (*Filename.(remove_extension file_name)*)) number *) let fail_and_exit s = print_endline s; exit 1 (* hack to derive yojson for ppxlib types *) (* https://github.com/ocaml-ppx/ppx_deriving#working-with-existing-types *) module Loc = struct type position = Lexing.position = { pos_fname : string ; pos_lnum : int ; pos_bol : int ; pos_cnum : int } and location = Location.t = { loc_start : position; loc_end : position; loc_ghost : bool; } [@@deriving yojson] end (** A common type to represent mutations *) type mutant = { number : int; repl : string option; loc : Loc.location; } [@@deriving yojson] (** A common type to represent test results *) type test_result = { status : int; mutant : mutant; } [@@deriving yojson]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>