Behaviour for the OTP :cover test seam used by
MutagenEx.CoverageRunner.
Production code talks to the :cover Erlang module (lifted from
lib/tools-*/ebin on first use); the facade exists so tests can swap
a fake recording stub and assert on the lifecycle (start, compile,
analyse, stop) without touching the real cover_server.
Default
MutagenEx.Test.Cover delegates to :cover.
Summary
Types
Result of :cover.analyse/3 with :coverage + :line.
Result of :cover.compile_beam/1.
Result of :cover.start/0.
Callbacks
Analyse coverage for an instrumented module. Mirrors
:cover.analyse(module, :coverage, :line).
Instrument a .beam for coverage. Mirrors :cover.compile_beam/1.
Start the cover_server. Mirrors :cover.start/0.
Stop the cover_server. Mirrors :cover.stop/0.
Types
@type analyse_result() :: {:ok, [{{module(), pos_integer()}, {non_neg_integer(), non_neg_integer()}}]} | {:error, term()}
Result of :cover.analyse/3 with :coverage + :line.
Result of :cover.compile_beam/1.
Result of :cover.start/0.
Callbacks
@callback analyse(module :: module(), type :: atom(), granularity :: atom()) :: analyse_result()
Analyse coverage for an instrumented module. Mirrors
:cover.analyse(module, :coverage, :line).
@callback compile_beam(path :: charlist()) :: compile_beam_result()
Instrument a .beam for coverage. Mirrors :cover.compile_beam/1.
path is the charlist returned by :code.which/1; the runner does
the conversion at the call site.
@callback start() :: start_result()
Start the cover_server. Mirrors :cover.start/0.
@callback stop() :: any()
Stop the cover_server. Mirrors :cover.stop/0.