Improve documentation of literal mutators
This commit is contained in:
parent
48892556fa
commit
cf2d685dfc
9 changed files with 33 additions and 9 deletions
|
@ -27,7 +27,7 @@ module Mutant
|
|||
new(self.class::INVERSE_CLASS)
|
||||
end
|
||||
|
||||
# Represent mutations of true literal
|
||||
# Mutator for true literals
|
||||
class TrueLiteral < self
|
||||
INVERSE_CLASS = Rubinius::AST::FalseLiteral
|
||||
|
||||
|
@ -35,7 +35,7 @@ module Mutant
|
|||
end
|
||||
|
||||
|
||||
# Represent mutations of false literal
|
||||
# Mutator for false literals
|
||||
class FalseLiteral < self
|
||||
INVERSE_CLASS = Rubinius::AST::TrueLiteral
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ module Mutant
|
|||
class Literal
|
||||
# Abstract mutations on dynamic literals
|
||||
class Dynamic < self
|
||||
include AbstractType
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal < self
|
||||
# Represent mutations on fixnum literal
|
||||
# Mutator for fixnum literals
|
||||
class Fixnum < self
|
||||
|
||||
handle(Rubinius::AST::FixnumLiteral)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal < self
|
||||
# Represent mutations on fixnum literal
|
||||
# Mutator for float literals
|
||||
class Float < self
|
||||
|
||||
handle(Rubinius::AST::FloatLiteral)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal
|
||||
# Mutator for hash literal AST nodes
|
||||
class Literal
|
||||
# Mutator for hash literals
|
||||
class Hash < self
|
||||
|
||||
handle(Rubinius::AST::HashLiteral)
|
||||
|
|
23
lib/mutant/mutator/literal/nil.rb
Normal file
23
lib/mutant/mutator/literal/nil.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal
|
||||
# Mutator for nil literals
|
||||
class Nil < self
|
||||
|
||||
handle(Rubinius::AST::NilLiteral)
|
||||
|
||||
private
|
||||
|
||||
# Emit mutants
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def dispatch
|
||||
emit('Object.new'.to_ast)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal < self
|
||||
# Mutator for regexp literal AST nodes
|
||||
# Mutator for regexp literals
|
||||
class Regex < self
|
||||
|
||||
handle(Rubinius::AST::RegexLiteral)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal
|
||||
# Represent mutations on string literal
|
||||
# Mutator for string literals
|
||||
class String < self
|
||||
|
||||
handle(Rubinius::AST::StringLiteral)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Mutant
|
||||
class Mutator
|
||||
class Literal < self
|
||||
# Represent mutations on symbol literal
|
||||
# Mutator for symbol literals
|
||||
class Symbol < self
|
||||
|
||||
handle(Rubinius::AST::SymbolLiteral)
|
||||
|
|
Loading…
Add table
Reference in a new issue