2013-01-01 15:41:39 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
2013-01-04 16:16:03 -05:00
|
|
|
|
|
|
|
# Mutator for while expressions
|
2013-01-01 15:41:39 -05:00
|
|
|
class While < self
|
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
handle(:while)
|
2013-01-01 15:41:39 -05:00
|
|
|
|
2013-06-21 09:06:39 -04:00
|
|
|
children :condition, :body
|
|
|
|
|
2013-01-01 15:41:39 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
2013-06-21 09:06:39 -04:00
|
|
|
emit_condition_mutations
|
|
|
|
emit_body_mutations
|
2013-07-04 21:09:07 -04:00
|
|
|
emit_body(nil)
|
2013-01-01 15:41:39 -05:00
|
|
|
end
|
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
end # While
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|