Sha256: 7795534b0e6d9e13feaa83d8a86a3eb6e4e3b0f7b697b9a112dc0a4261b5c823
Contents?: true
Size: 939 Bytes
Versions: 37
Compression:
Stored size: 939 Bytes
Contents
require 'spec_helper' describe Mutant::Mutator::Node::Literal, 'range' do context 'inclusive range literal' do let(:source) { '1..100' } let(:mutations) do mutations = [] mutations << 'nil' mutations << '1...100' mutations << '(0.0/0.0)..100' #mutations << [:dot2, [:negate, [:call, [:lit, 1.0], :/, [:arglist, [:lit, 0.0]]]], [:lit, 100]] mutations << '1..(1.0/0.0)' mutations << '1..(0.0/0.0)' end it_should_behave_like 'a mutator' end context 'exclusive range literal' do let(:source) { '1...100' } let(:mutations) do mutations = [] mutations << 'nil' mutations << '1..100' mutations << '(0.0/0.0)...100' #mutations << [:dot3, [:negate, [:call, [:lit, 1.0], :/, [:arglist, [:lit, 0.0]]]], [:lit, 100]] mutations << '1...(1.0/0.0)' mutations << '1...(0.0/0.0)' end it_should_behave_like 'a mutator' end end
Version data entries
37 entries across 37 versions & 1 rubygems