Class: MutationTester::BatchRunner::Result
- Inherits:
-
Struct
- Object
- Struct
- MutationTester::BatchRunner::Result
- Defined in:
- lib/mutation_tester/batch_runner.rb
Instance Attribute Summary collapse
-
#interrupted ⇒ Object
Returns the value of attribute interrupted.
-
#processed ⇒ Object
Returns the value of attribute processed.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#unchanged ⇒ Object
Returns the value of attribute unchanged.
Instance Method Summary collapse
- #gate_passed? ⇒ Boolean
- #interrupted? ⇒ Boolean
- #matched_any? ⇒ Boolean
- #nothing_measured? ⇒ Boolean
- #success? ⇒ Boolean
- #survivors ⇒ Object
Instance Attribute Details
#interrupted ⇒ Object
Returns the value of attribute interrupted
37 38 39 |
# File 'lib/mutation_tester/batch_runner.rb', line 37 def interrupted @interrupted end |
#processed ⇒ Object
Returns the value of attribute processed
37 38 39 |
# File 'lib/mutation_tester/batch_runner.rb', line 37 def processed @processed end |
#skipped ⇒ Object
Returns the value of attribute skipped
37 38 39 |
# File 'lib/mutation_tester/batch_runner.rb', line 37 def skipped @skipped end |
#unchanged ⇒ Object
Returns the value of attribute unchanged
37 38 39 |
# File 'lib/mutation_tester/batch_runner.rb', line 37 def unchanged @unchanged end |
Instance Method Details
#gate_passed? ⇒ Boolean
66 67 68 69 70 71 72 |
# File 'lib/mutation_tester/batch_runner.rb', line 66 def gate_passed? return false unless matched_any? return false if nothing_measured? return true if processed.empty? success? end |
#interrupted? ⇒ Boolean
74 75 76 |
# File 'lib/mutation_tester/batch_runner.rb', line 74 def interrupted? !!interrupted end |
#matched_any? ⇒ Boolean
58 59 60 |
# File 'lib/mutation_tester/batch_runner.rb', line 58 def matched_any? !(processed.empty? && skipped.empty? && (unchanged || []).empty?) end |
#nothing_measured? ⇒ Boolean
62 63 64 |
# File 'lib/mutation_tester/batch_runner.rb', line 62 def nothing_measured? processed.empty? && !skipped.empty? end |
#success? ⇒ Boolean
38 39 40 |
# File 'lib/mutation_tester/batch_runner.rb', line 38 def success? processed.all?(&:passed?) end |
#survivors ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/mutation_tester/batch_runner.rb', line 42 def survivors processed.flat_map do |entry| (entry.results || []) .select { |r| Reporters::BaseReporter.status_for(r) == :survived } .map do |r| { file: entry.source_file, line: r[:line], type: r[:type], original: r[:original], mutated: r[:mutated] } end end end |