free_mutant/lib/mutant/mutation/neutral.rb
Markus Schirp eaa4451cd9 Remove unused interface
Dunno why I ever merged this. Its IMHO wrong to expose those predicates.
2013-09-06 22:29:31 +02:00

46 lines
790 B
Ruby

# encoding: utf-8
module Mutant
class Mutation
# Neutral mutation
class Neutral < self
SYMBOL = 'neutral'
# Noop mutation, special case of neutral
class Noop < self
SYMBOL = 'noop'
end
# Return identification
#
# @return [String]
#
# @api private
#
def identification
"#{self.class::SYMBOL}:#{super}"
end
memoize :identification
# Test if killer is successful
#
# @param [Killer] killer
#
# @return [true]
# if killer did NOT killed mutation
#
# @return [false]
# otherwise
#
# @api private
#
def success?(killer)
!killer.killed?
end
end # Neutral
end # Mutation
end # Mutant