Skip to content

Commit

Permalink
Remove float literal negation mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgollahon committed Feb 6, 2021
1 parent f93ab7a commit ff45234
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

* [#1219](https://github.com/mbj/mutant/pull/1218)

* Remove float literal negation mutations (`1.0` -> `-1.0`).

* [#1218](https://github.com/mbj/mutant/pull/1218)

* Remove integer literal negation mutations (`1` -> `-1`).
Expand Down
4 changes: 1 addition & 3 deletions lib/mutant/mutator/node/literal/float.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def emit_special_cases
end

def values
original = children.first

[0.0, 1.0, -original]
[0.0, 1.0]
end

end # Float
Expand Down
3 changes: 0 additions & 3 deletions meta/float.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
mutation '0.0 / 0.0'
mutation '1.0 / 0.0'
mutation '-1.0 / 0.0'

# negative
mutation '-10.0'
end

Mutant::Meta::Example.add :float do
Expand Down

0 comments on commit ff45234

Please sign in to comment.