Skip to content

Commit

Permalink
Remove duplicated test selection print
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Nov 22, 2020
1 parent c66fec1 commit 54625ab
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 88 deletions.
1 change: 0 additions & 1 deletion lib/mutant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ module Mutant
require 'mutant/reporter/cli/printer/mutation_result'
require 'mutant/reporter/cli/printer/status_progressive'
require 'mutant/reporter/cli/printer/subject_result'
require 'mutant/reporter/cli/printer/test_result'
require 'mutant/reporter/cli/format'
require 'mutant/repository'
require 'mutant/repository/diff'
Expand Down
6 changes: 0 additions & 6 deletions lib/mutant/reporter/cli/printer/isolation_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,13 @@ class IsolationResult < self
# @return [undefined]
def run
print_timeout
print_tests
print_process_status
print_log_messages
print_exception
end

private

def print_tests
value = object.value or return
visit(TestResult, value)
end

def print_log_messages
log = object.log

Expand Down
1 change: 0 additions & 1 deletion lib/mutant/reporter/cli/printer/mutation_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def run

def print_details
visit_isolation_result
puts(SEPARATOR)
__send__(MAP.fetch(mutation.class))
end

Expand Down
29 changes: 0 additions & 29 deletions lib/mutant/reporter/cli/printer/test_result.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/unit/mutant/reporter/cli/printer/env_result_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
- test-a
evil:subject-a:d27d2
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
@@ -1 +1 @@
-true
+false
Expand Down
18 changes: 2 additions & 16 deletions spec/unit/mutant/reporter/cli/printer/isolation_result_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@

describe '.call' do
context 'on successful isolation' do
it_reports <<~'STR'
- 1 @ runtime: 1.0
- test-a
STR
it_reports ''
end

context 'on exception isolation error' do
Expand All @@ -41,8 +38,6 @@ def backtrace
end

it_reports <<~'STR'
- 1 @ runtime: 1.0
- test-a
Killing the mutation resulted in an integration error.
This is the case when the tests selected for the current mutation
did not produce a test result, but instead an exception was raised.
Expand All @@ -67,8 +62,6 @@ def backtrace
let(:log) { 'log message' }

it_reports <<~'STR'
- 1 @ runtime: 1.0
- test-a
Log messages (combined stderr and stdout):
[killfork] log message
STR
Expand All @@ -80,8 +73,6 @@ def backtrace
end

it_reports <<~'STR'
- 1 @ runtime: 1.0
- test-a
Killfork exited nonzero. Its result (if any) was ignored.
Process status:
#<InstanceDouble(Process::Status) "unsuccessful status">
Expand All @@ -93,10 +84,7 @@ def backtrace
instance_double(Process::Status, 'unsuccessful status', success?: true)
end

it_reports <<~'STR'
- 1 @ runtime: 1.0
- test-a
STR
it_reports ''
end

context 'on timeout while process exits successful' do
Expand All @@ -108,8 +96,6 @@ def backtrace

it_reports <<~'STR'
Mutation analysis ran into the configured timeout of 02 seconds.
- 1 @ runtime: 1.0
- test-a
STR
end

Expand Down
15 changes: 0 additions & 15 deletions spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
[
[Unparser::Color::NONE, "evil:subject-a:d27d2\n"],
[Unparser::Color::NONE, "-----------------------\n"],
[Unparser::Color::NONE, "- 1 @ runtime: 1.0\n"],
[Unparser::Color::NONE, " - test-a\n"],
[Unparser::Color::NONE, "-----------------------\n"],
[Unparser::Color::NONE, "@@ -1 +1 @@\n"],
[Unparser::Color::RED, "-true\n"],
[Unparser::Color::GREEN, "+false\n"],
Expand All @@ -35,9 +32,6 @@
it_reports(<<~'STR')
evil:subject-a:d27d2
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
@@ -1 +1 @@
-true
+false
Expand All @@ -56,9 +50,6 @@
it_reports(<<~REPORT)
evil:subject-a:a5bc7
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
--- Internal failure ---
BUG: A generted mutation did not result in exactly one diff hunk!
This is an invariant violation by the mutation generation engine.
Expand Down Expand Up @@ -86,9 +77,6 @@
it_reports(<<~REPORT)
neutral:subject-a:d5318
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
--- Neutral failure ---
Original code was inserted unmutated. And the test did NOT PASS.
Your tests do not pass initially or you found a bug in mutant / unparser.
Expand All @@ -110,9 +98,6 @@
it_reports(<<~REPORT)
noop:subject-a:d5318
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
---- Noop failure -----
No code was inserted. And the test did NOT PASS.
This is typically a problem of your specs not passing unmutated.
Expand Down
3 changes: 0 additions & 3 deletions spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
- test-a
evil:subject-a:d27d2
-----------------------
- 1 @ runtime: 1.0
- test-a
-----------------------
@@ -1 +1 @@
-true
+false
Expand Down
14 changes: 0 additions & 14 deletions spec/unit/mutant/reporter/cli/printer/test_result_spec.rb

This file was deleted.

0 comments on commit 54625ab

Please sign in to comment.