Simplify float literal mutator
* Adjust flay score
This commit is contained in:
parent
35841bded2
commit
45d47add08
2 changed files with 14 additions and 4 deletions
|
@ -1,2 +1,2 @@
|
|||
---
|
||||
threshold: 15.6
|
||||
threshold: 14.4
|
||||
|
|
|
@ -15,12 +15,22 @@ module Mutant
|
|||
def dispatch
|
||||
emit_nil
|
||||
emit_values(values)
|
||||
emit_safe(infinity)
|
||||
emit_safe(negative_infinity)
|
||||
emit_safe(nan)
|
||||
emit_special_cases
|
||||
emit_new { new_self(Random.float) }
|
||||
end
|
||||
|
||||
# Emit special cases
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def emit_special_cases
|
||||
[infinity, negative_infinity, nan].each do |value|
|
||||
emit_safe(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Return values to test against
|
||||
#
|
||||
# @return [Array]
|
||||
|
|
Loading…
Add table
Reference in a new issue