Sha256: e0667d23604260f9cd243f056863d2db3c609c9f396a8a71f30b3e8e6c532903

Contents?: true

Size: 544 Bytes

Versions: 5

Compression:

Stored size: 544 Bytes

Contents

module Mutest
  class Mutator
    class Node
      class Literal < self
        # Abstract mutator for boolean literals
        class Boolean < self
          private

          MAP = {
            true:  :false,
            false: :true
          }.freeze

          handle(*MAP.keys)

          # Emit mutations
          #
          # @return [undefined]
          def dispatch
            emit_nil
            emit(s(MAP.fetch(node.type)))
          end
        end # Boolean
      end # Literal
    end # Node
  end # Mutator
end # Mutest

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mutest-0.0.6 lib/mutest/mutator/node/literal/boolean.rb
mutest-0.0.5 lib/mutest/mutator/node/literal/boolean.rb
mutest-0.0.4 lib/mutest/mutator/node/literal/boolean.rb
mutest-0.0.3 lib/mutest/mutator/node/literal/boolean.rb
mutest-0.0.2 lib/mutest/mutator/node/literal/boolean.rb