Class: Evilution::Result::MutationResult
- Inherits:
-
Object
- Object
- Evilution::Result::MutationResult
- Defined in:
- lib/evilution/result/mutation_result.rb
Constant Summary collapse
- STATUSES =
%i[killed survived timeout error neutral equivalent].freeze
Instance Attribute Summary collapse
-
#child_rss_kb ⇒ Object
readonly
Returns the value of attribute child_rss_kb.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#killing_test ⇒ Object
readonly
Returns the value of attribute killing_test.
-
#memory_delta_kb ⇒ Object
readonly
Returns the value of attribute memory_delta_kb.
-
#mutation ⇒ Object
readonly
Returns the value of attribute mutation.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#test_command ⇒ Object
readonly
Returns the value of attribute test_command.
Instance Method Summary collapse
- #equivalent? ⇒ Boolean
- #error? ⇒ Boolean
-
#initialize(mutation:, status:, duration: 0.0, killing_test: nil, test_command: nil, child_rss_kb: nil, memory_delta_kb: nil) ⇒ MutationResult
constructor
A new instance of MutationResult.
- #killed? ⇒ Boolean
- #neutral? ⇒ Boolean
- #survived? ⇒ Boolean
- #timeout? ⇒ Boolean
Constructor Details
#initialize(mutation:, status:, duration: 0.0, killing_test: nil, test_command: nil, child_rss_kb: nil, memory_delta_kb: nil) ⇒ MutationResult
Returns a new instance of MutationResult.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/evilution/result/mutation_result.rb', line 11 def initialize(mutation:, status:, duration: 0.0, killing_test: nil, test_command: nil, child_rss_kb: nil, memory_delta_kb: nil) raise ArgumentError, "invalid status: #{status}" unless STATUSES.include?(status) @mutation = mutation @status = status @duration = duration @killing_test = killing_test @test_command = test_command @child_rss_kb = child_rss_kb @memory_delta_kb = memory_delta_kb freeze end |
Instance Attribute Details
#child_rss_kb ⇒ Object (readonly)
Returns the value of attribute child_rss_kb.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def child_rss_kb @child_rss_kb end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def duration @duration end |
#killing_test ⇒ Object (readonly)
Returns the value of attribute killing_test.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def killing_test @killing_test end |
#memory_delta_kb ⇒ Object (readonly)
Returns the value of attribute memory_delta_kb.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def memory_delta_kb @memory_delta_kb end |
#mutation ⇒ Object (readonly)
Returns the value of attribute mutation.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def mutation @mutation end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def status @status end |
#test_command ⇒ Object (readonly)
Returns the value of attribute test_command.
8 9 10 |
# File 'lib/evilution/result/mutation_result.rb', line 8 def test_command @test_command end |
Instance Method Details
#equivalent? ⇒ Boolean
45 46 47 |
# File 'lib/evilution/result/mutation_result.rb', line 45 def equivalent? status == :equivalent end |
#error? ⇒ Boolean
37 38 39 |
# File 'lib/evilution/result/mutation_result.rb', line 37 def error? status == :error end |
#killed? ⇒ Boolean
25 26 27 |
# File 'lib/evilution/result/mutation_result.rb', line 25 def killed? status == :killed end |
#neutral? ⇒ Boolean
41 42 43 |
# File 'lib/evilution/result/mutation_result.rb', line 41 def neutral? status == :neutral end |
#survived? ⇒ Boolean
29 30 31 |
# File 'lib/evilution/result/mutation_result.rb', line 29 def survived? status == :survived end |
#timeout? ⇒ Boolean
33 34 35 |
# File 'lib/evilution/result/mutation_result.rb', line 33 def timeout? status == :timeout end |