Muex. Reporter. Patch
(Muex v0.8.1)
View Source
Builds a compact before/after snippet for a mutation.
Reporters use this to show the actual code change introduced by each
mutation, making survived or suspicious mutants easy to reproduce. Snippets
are rendered from the mutation's :original_ast and :ast via
Macro.to_string/1, falling back to inspect/1 for abstract code that the
Elixir formatter cannot stringify (e.g. Erlang forms).
of/1 returns nil when the mutation does not carry both the original and
mutated AST, so callers can omit the patch gracefully.
Summary
Functions
Returns a %{before: ..., after: ...} patch for a mutation.