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
|
||||
* 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
|
||||
|
||||
|
|
|
@ -16,21 +16,10 @@ module Mutant
|
|||
#
|
||||
# @api private
|
||||
def dispatch
|
||||
emit_expression_mutations do |node|
|
||||
!n_self?(node)
|
||||
end
|
||||
|
||||
emit_bools
|
||||
end
|
||||
|
||||
# Emit booleans
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# @api private
|
||||
def emit_bools
|
||||
emit_singletons
|
||||
emit(N_TRUE)
|
||||
emit(N_FALSE)
|
||||
|
||||
emit_expression_mutations { |node| !n_self?(node) }
|
||||
end
|
||||
|
||||
end # Defined
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Mutant::Meta::Example.add do
|
||||
source 'defined?(foo)'
|
||||
|
||||
singleton_mutations
|
||||
mutation 'defined?(nil)'
|
||||
mutation 'true'
|
||||
mutation 'false'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue