free_mutant/meta/lvar.rb
Markus Schirp 017ccc1044 Add expression => self mutation
Also reorganizes parts of meta to align filenames to node name better.

Closes #191
2014-06-05 17:48:39 +00:00

16 lines
483 B
Ruby

# encoding: utf-8
Mutant::Meta::Example.add do
source 'a = nil; a'
mutation 'a = nil; nil'
mutation 'a = nil; self'
mutation 'a = nil'
# TODO: fix invalid AST
# These ASTs are not valid and should NOT be emitted
# Mutations of lvarasgn need to be special cased to avoid this.
mutation s(:begin, s(:lvasgn, :a__mutant__, s(:nil)), s(:lvar, :a))
mutation s(:begin, s(:nil), s(:lvar, :a))
mutation s(:begin, s(:self), s(:lvar, :a))
mutation s(:lvar, :a)
end