34 lines
590 B
Ruby
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
|