Class: Mutant::Reporter::CLI::Printer::SubjectResult Private
- Inherits:
-
Mutant::Reporter::CLI::Printer
- Object
- Mutant::Reporter::CLI::Printer
- Mutant::Reporter::CLI::Printer::SubjectResult
- Defined in:
- lib/mutant/reporter/cli/printer/subject_result.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Subject result printer
Renders subject identification, tests, and all uncovered mutations inline so that subject context (source, node) is available when printing mutation details.
Constant Summary collapse
- MAP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ 'evil' => :evil_details, 'neutral' => :neutral_details, 'noop' => :noop_details }.freeze
- NEUTRAL_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"--- Neutral failure ---\nOriginal code was inserted unmutated. And the test did NOT PASS.\nYour tests do not pass initially or you found a bug in mutant / unparser.\nSubject AST:\n%s\nUnparsed Source:\n%s\n"- NO_DIFF_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"--- Internal failure ---\nBUG: A generated mutation did not result in exactly one diff hunk!\nThis is an invariant violation by the mutation generation engine.\nPlease report a reproduction to https://github.com/mbj/mutant\nOriginal unparsed source:\n%s\nOriginal AST:\n%s\nMutated unparsed source:\n%s\nMutated AST:\n%s\n"- NOOP_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"---- Noop failure -----\nNo code was inserted. And the test did NOT PASS.\nThis is typically a problem of your specs not passing unmutated.\n"- SEPARATOR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'-----------------------'- STATS_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'tests: %d, runtime: %.2fs, killtime: %.2fs'
Constants inherited from Mutant::Reporter::CLI::Printer
Instance Method Summary collapse
-
#run ⇒ undefined
private
Run report printer.
Methods inherited from Mutant::Reporter::CLI::Printer
Methods included from Procto
Instance Method Details
#run ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run report printer
61 62 63 64 65 66 67 68 |
# File 'lib/mutant/reporter/cli/printer/subject_result.rb', line 61 def run status(object.identification) puts(STATS_FORMAT % [tests.length, object.runtime, object.killtime]) uncovered_results.each do |coverage_result| print_mutation_result(coverage_result.mutation_result) end print_selected_tests end |