2014-06-02 08:57:14 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
Mutant::Meta::Example.add do
|
2014-06-05 12:37:31 -04:00
|
|
|
source 'if condition; true; else false; end'
|
|
|
|
|
|
|
|
singleton_mutations
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
# mutation of condition
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'if !condition; true; else false; end'
|
|
|
|
mutation 'if nil; true; else false; end'
|
|
|
|
mutation 'if true; true; else false; end'
|
|
|
|
mutation 'if false; true; else false; end'
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
# Deleted else branch
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'if condition; true end'
|
2014-06-02 08:57:14 -04:00
|
|
|
|
2014-08-12 19:34:20 -04:00
|
|
|
# Deleted if branch resulting in unless rendering
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'unless condition; false; end'
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
# Deleted if branch with promoting else branch to if branch
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'if condition; false end'
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
# mutation of if body
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'if condition; false; else false; end'
|
|
|
|
mutation 'if condition; nil; else false; end'
|
2014-06-02 08:57:14 -04:00
|
|
|
|
|
|
|
# mutation of else body
|
2014-06-05 12:37:31 -04:00
|
|
|
mutation 'if condition; true; else true; end'
|
|
|
|
mutation 'if condition; true; else nil; end'
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
Mutant::Meta::Example.add do
|
|
|
|
source 'if condition; true; end'
|
|
|
|
|
2014-06-05 12:37:31 -04:00
|
|
|
singleton_mutations
|
2014-06-02 08:57:14 -04:00
|
|
|
mutation 'if !condition; true; end'
|
|
|
|
mutation 'if condition; false; end'
|
|
|
|
mutation 'if condition; nil; end'
|
|
|
|
mutation 'if true; true; end'
|
|
|
|
mutation 'if false; true; end'
|
|
|
|
mutation 'if nil; true; end'
|
|
|
|
end
|
|
|
|
|
|
|
|
Mutant::Meta::Example.add do
|
2014-06-05 12:37:31 -04:00
|
|
|
source 'unless condition; true; end'
|
|
|
|
|
|
|
|
singleton_mutations
|
|
|
|
mutation 'unless !condition; true; end'
|
|
|
|
mutation 'unless nil; true; end'
|
|
|
|
mutation 'unless true; true; end'
|
|
|
|
mutation 'unless false; true; end'
|
|
|
|
mutation 'unless condition; false; end'
|
|
|
|
mutation 'unless condition; nil; end'
|
|
|
|
mutation 'if condition; true; end'
|
2014-06-02 08:57:14 -04:00
|
|
|
end
|