package windtrap

  1. Overview
  2. Docs
One library for all your OCaml tests

Install

dune-project
 Dependency

Authors

Maintainers

Sources

windtrap-0.2.0.tbz
sha256=2e61a86f8c97502c1f8a593c28e255d591a44b1533c6eed8cd0c847afa3d772a
sha512=060d0a47d926d420e0f96f4912c2690d148d6196bcbb701b2463a4fb9ffade5c4ff4d98d703f4b80b2b8ad1bed848c68f1d613e3ba745f9cd5e7d313e049bdc3

doc/windtrap.runtime/Windtrap_runtime/index.html

Module Windtrap_runtimeSource

The runtime library that instrumented code links.

Code instrumented by ppx_windtrap.coverage calls Coverage, and code instrumented by ppx_windtrap.mutate calls Mutate, at module load and then at every point or site. The mutation loop of the windtrap library drives Mutate and writes what it finds through Verdicts, and the windtrap command merges the files of both formats. Instr is what the two formats share.

The library depends on the standard library only, so it cannot call the windtrap library. It writes its warnings itself, on the standard error of the instrumented process and behind the windtrap: prefix, whatever the flags of a run. It reads one environment variable, WINDTRAP_COVERAGE_FILE, at the first Coverage.register of the process. It never decides which mutants a run tests nor which one a process arms. Its caller does, with Mutate.catalogue and Mutate.arm.

Loading the library has one effect, the registration of the printer of Mutate.Runaway.

Generated code. The ppx_windtrap package depends on the windtrap package at its own version, so the rewriters and this library are released together. That pairing is why generated code may name Coverage.register, Coverage.visit and the fields of Coverage.point, and Mutate.register and the fields of Mutate.site. No stability of these names is promised from one version to the next.

Sourcemodule Instr : sig ... end

What the two file formats share: build paths, writer identities, atomic writes and the scanner. It also holds the warning line of the runtime.

Sourcemodule Coverage : sig ... end

Expression coverage: the point registry, the dump written at exit and the report data.

Sourcemodule Mutate : sig ... end

Mutation: the mutant catalogue, the arming guard and the reach map.

Sourcemodule Verdicts : sig ... end

Mutation verdicts and the .mutants file that carries them.