diff --git a/Changelog.md b/Changelog.md index 379dea479..a2c8917f5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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`). diff --git a/lib/mutant/mutator/node/literal/float.rb b/lib/mutant/mutator/node/literal/float.rb index 7332200b1..ba18dc9c8 100644 --- a/lib/mutant/mutator/node/literal/float.rb +++ b/lib/mutant/mutator/node/literal/float.rb @@ -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 diff --git a/meta/float.rb b/meta/float.rb index 4550b6f2c..2858e4982 100644 --- a/meta/float.rb +++ b/meta/float.rb @@ -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