Improve defined?
mutations
* Correct changelog reference
This commit is contained in:
parent
6fdc5beab2
commit
05955f5e9d
3 changed files with 5 additions and 16 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
* Remove invalid mutation `foo or bar` to `!(foo or bar)` see #287
|
* Remove invalid mutation `foo or bar` to `!(foo or bar)` see #287
|
||||||
* Add mutation from `#to_h` to `#to_hash` #218
|
* Add mutation from `#to_h` to `#to_hash` #218
|
||||||
* Add mutation from `#defined?` to `true` / `false` #399
|
* Add mutation from `#defined?` to `true` / `false` #334
|
||||||
|
|
||||||
# v0.8.1 2015-07-24
|
# v0.8.1 2015-07-24
|
||||||
|
|
||||||
|
|
|
@ -16,21 +16,10 @@ module Mutant
|
||||||
#
|
#
|
||||||
# @api private
|
# @api private
|
||||||
def dispatch
|
def dispatch
|
||||||
emit_expression_mutations do |node|
|
emit_singletons
|
||||||
!n_self?(node)
|
|
||||||
end
|
|
||||||
|
|
||||||
emit_bools
|
|
||||||
end
|
|
||||||
|
|
||||||
# Emit booleans
|
|
||||||
#
|
|
||||||
# @return [undefined]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
def emit_bools
|
|
||||||
emit(N_TRUE)
|
emit(N_TRUE)
|
||||||
emit(N_FALSE)
|
|
||||||
|
emit_expression_mutations { |node| !n_self?(node) }
|
||||||
end
|
end
|
||||||
|
|
||||||
end # Defined
|
end # Defined
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Mutant::Meta::Example.add do
|
Mutant::Meta::Example.add do
|
||||||
source 'defined?(foo)'
|
source 'defined?(foo)'
|
||||||
|
|
||||||
|
singleton_mutations
|
||||||
mutation 'defined?(nil)'
|
mutation 'defined?(nil)'
|
||||||
mutation 'true'
|
mutation 'true'
|
||||||
mutation 'false'
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue