Sha256: 9238f973419d4afc40dbe3413b1f5265f8cad82ffc06dc7026dbfab102e5f4ca

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 Bytes

Contents

mutations = {
  [:regexp_digit_type,           '/\d/'] => [:regexp_nondigit_type,           '/\D/'],
  [:regexp_hex_type,             '/\h/'] => [:regexp_nonhex_type,             '/\H/'],
  [:regexp_space_type,           '/\s/'] => [:regexp_nonspace_type,           '/\S/'],
  [:regexp_word_boundary_anchor, '/\b/'] => [:regexp_nonword_boundary_anchor, '/\B/'],
  [:regexp_word_type,            '/\w/'] => [:regexp_nonword_type,            '/\W/']
}

mutations = mutations.merge(mutations.invert)

mutations.each do |(source_type, source_mutation), (_, regexp_mutation)|
  Mutest::Meta::Example.add source_type do
    source(source_mutation)

    singleton_mutations
    regexp_mutations

    mutation(regexp_mutation)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mutest-0.0.10 meta/regexp/character_types.rb
mutest-0.0.9 meta/regexp/character_types.rb
mutest-0.0.8 meta/regexp/character_types.rb
mutest-0.0.7 meta/regexp/character_types.rb
mutest-0.0.6 meta/regexp/character_types.rb
mutest-0.0.5 meta/regexp/character_types.rb
mutest-0.0.4 meta/regexp/character_types.rb
mutest-0.0.3 meta/regexp/character_types.rb
mutest-0.0.2 meta/regexp/character_types.rb