Class: Mutant::Result::Mutation Private

Inherits:
Object
  • Object
show all
Includes:
Mutant::Result
Defined in:
lib/mutant/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.

Mutation result

Instance Method Summary collapse

Methods included from Mutant::Result

included, #overhead

Instance Method Details

#criteria_result(coverage_criteria) ⇒ Object

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.

Create mutation criteria results



251
252
253
254
255
256
257
# File 'lib/mutant/result.rb', line 251

def criteria_result(coverage_criteria)
  CoverageCriteria.new(
    process_abort: coverage_criteria.process_abort && process_abort?,
    test_result:   coverage_criteria.test_result   && test_result_success?,
    timeout:       coverage_criteria.timeout       && timeout?
  )
end

#killtimeFloat

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.

Time the tests had been running

Returns:

  • (Float)


262
263
264
# File 'lib/mutant/result.rb', line 262

def killtime
  isolation_result.value&.runtime || 0.0
end

#process_abort?Boolean

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.

Test for unexpected process abort

Returns:

  • (Boolean)


276
277
278
279
280
# File 'lib/mutant/result.rb', line 276

def process_abort?
  process_status = isolation_result.process_status or return false

  !timeout? && !process_status.exited?
end

#timeout?Boolean

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.

Test for timeout

Returns:

  • (Boolean)


269
270
271
# File 'lib/mutant/result.rb', line 269

def timeout?
  !isolation_result.timeout.nil?
end