package mutaml
A mutation tester for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
0.2.tar.gz
md5=61addf5724238b477033e654412651eb
sha512=bd9efe0bd5a1098f03adc199f688b265362223bc5509bc1d3255696ba0e5e22f08b66434367e0a15f00e02dd074fd83dc2da094867a80c91ff397ffc07734778
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)"
>