free_mutant/lib/mutant/test.rb
2014-06-28 22:37:48 +00:00

34 lines
590 B
Ruby

module Mutant
# Abstract base class for test that might kill a mutation
class Test
include AbstractType, Adamantium::Flat
# Run tests
#
# @return [Test::Result]
#
# @api private
#
abstract_method :run
# Return test identification
#
# @return [String]
#
# @api private
#
def identification
"#{self.class::PREFIX}:#{expression.syntax}"
end
memoize :identification
# Return expression
#
# @return [Expression]
#
# @api private
#
abstract_method :expression
end # Test
end # Mutant