free_mutant/meta/array.rb
Markus Schirp 7bf70d9634 Add support for explicit type in meta examples
* This is needed to relate examples to node types for nodes that cannot
  stand alone. Example are :where nodes that do not have syntax outside
  a :case
2016-03-19 15:13:05 +00:00

28 lines
501 B
Ruby

Mutant::Meta::Example.add :array do
source '[true]'
singleton_mutations
mutation 'true'
mutation '[false]'
mutation '[nil]'
mutation '[]'
end
Mutant::Meta::Example.add :array do
source '[true, false]'
singleton_mutations
# Mutation of each element in array
mutation '[nil, false]'
mutation '[false, false]'
mutation '[true, nil]'
mutation '[true, true]'
# Remove each element of array once
mutation '[true]'
mutation '[false]'
# Empty array
mutation '[]'
end