2018-09-12 10:21:24 -04:00
|
|
|
# frozen_string_literal: true
|
2018-09-12 09:15:43 -04:00
|
|
|
|
2016-03-19 11:13:05 -04:00
|
|
|
Mutant::Meta::Example.add :lvar do
|
2014-06-02 10:22:57 -04:00
|
|
|
source 'a = nil; a'
|
|
|
|
|
|
|
|
mutation 'a = nil; nil'
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'a = nil; self'
|
2014-06-02 10:22:57 -04:00
|
|
|
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))
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation s(:begin, s(:self), s(:lvar, :a))
|
2014-06-02 10:22:57 -04:00
|
|
|
mutation s(:lvar, :a)
|
|
|
|
end
|