mutant 0.8.14 → 0.8.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Changelog.md +5 -0
- data/Gemfile.lock +8 -8
- data/README.md +6 -8
- data/circle.yml +1 -1
- data/config/flay.yml +1 -1
- data/lib/mutant/ast/regexp/transformer/direct.rb +1 -0
- data/lib/mutant/ast/types.rb +1 -0
- data/lib/mutant/env/bootstrap.rb +1 -1
- data/lib/mutant/mutator/node/class.rb +8 -0
- data/lib/mutant/mutator/node/define.rb +1 -0
- data/lib/mutant/mutator/node/generic.rb +1 -0
- data/lib/mutant/mutator/node/regexp/character_type.rb +2 -1
- data/lib/mutant/mutator/node/send.rb +1 -1
- data/lib/mutant/version.rb +1 -1
- data/meta/class.rb +9 -0
- data/meta/def.rb +16 -1
- data/meta/kwarg.rb +1 -0
- data/meta/kwoptarg.rb +1 -0
- data/meta/regexp/character_types.rb +2 -1
- data/meta/rescue.rb +3 -0
- data/meta/restarg.rb +1 -0
- data/meta/send.rb +7 -0
- data/mutant-rspec.gemspec +1 -1
- data/mutant.gemspec +1 -1
- data/spec/integration/mutant/rspec_spec.rb +1 -1
- data/spec/integrations.yml +7 -1
- data/spec/support/corpus.rb +5 -2
- data/spec/support/warnings.yml +4 -1
- data/spec/unit/mutant/ast/regexp_spec.rb +8 -18
- data/spec/unit/mutant/subject/method/instance_spec.rb +5 -0
- data/test_app/Gemfile.rspec3.7 +7 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9fec35f4e371eea7ec2c1a4ea365dadfe6e70ea83b2101dfa8c044c2dbbdb926
|
4
|
+
data.tar.gz: c2266959a23af5ea88aa340736e72eba6b694f0f8f6b13b41f32679786ca9970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde250f06a7aa5c57ea032536af60823f58fd50c1f8cb81f418886cf71391bd2962c768e89a4ccde08c8a865dc4ede94c2c206061ca8c7cb7a5cb6a497727634
|
7
|
+
data.tar.gz: 255a0801bf27ef63c4b3be17c4c7bb9ba615d5928eb55389b603be52ccab172d379a5994c381b329f52ad6cc2461605eedf2bd943c1a3047b699523c061bdcf3
|
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mutant (0.8.
|
4
|
+
mutant (0.8.14)
|
5
5
|
abstract_type (~> 0.0.7)
|
6
6
|
adamantium (~> 0.2.0)
|
7
7
|
anima (~> 0.3.0)
|
@@ -15,11 +15,11 @@ PATH
|
|
15
15
|
parallel (~> 1.3)
|
16
16
|
parser (>= 2.3.1.4, < 2.5)
|
17
17
|
procto (~> 0.0.2)
|
18
|
-
regexp_parser (~> 0.4.
|
18
|
+
regexp_parser (~> 0.4.9)
|
19
19
|
unparser (~> 0.2.5)
|
20
|
-
mutant-rspec (0.8.
|
21
|
-
mutant (~> 0.8.
|
22
|
-
rspec-core (>= 3.4.0, < 3.
|
20
|
+
mutant-rspec (0.8.14)
|
21
|
+
mutant (~> 0.8.14)
|
22
|
+
rspec-core (>= 3.4.0, < 3.8.0)
|
23
23
|
|
24
24
|
GEM
|
25
25
|
remote: https://rubygems.org/
|
@@ -92,7 +92,7 @@ GEM
|
|
92
92
|
equalizer (~> 0.0.9)
|
93
93
|
ice_nine (~> 0.11.0)
|
94
94
|
procto (~> 0.0.2)
|
95
|
-
parallel (1.
|
95
|
+
parallel (1.12.1)
|
96
96
|
parser (2.4.0.0)
|
97
97
|
ast (~> 2.2)
|
98
98
|
path_expander (1.0.2)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
codeclimate-engine-rb (~> 0.4.0)
|
106
106
|
parser (>= 2.4.0.0, < 2.5)
|
107
107
|
rainbow (~> 2.0)
|
108
|
-
regexp_parser (0.4.
|
108
|
+
regexp_parser (0.4.9)
|
109
109
|
rspec (3.5.0)
|
110
110
|
rspec-core (~> 3.5.0)
|
111
111
|
rspec-expectations (~> 3.5.0)
|
@@ -166,4 +166,4 @@ DEPENDENCIES
|
|
166
166
|
mutant!
|
167
167
|
|
168
168
|
BUNDLED WITH
|
169
|
-
1.15.
|
169
|
+
1.15.4
|
data/README.md
CHANGED
@@ -2,11 +2,9 @@ mutant
|
|
2
2
|
======
|
3
3
|
|
4
4
|
[![Build Status](https://circleci.com/gh/mbj/mutant.svg?style=shield&circle-token=1afd77e8f0f9d0a11fd8f15f5d7b10270f4665e2)](https://circleci.com/gh/mbj/mutant/tree/master)
|
5
|
-
[![Dependency Status](https://gemnasium.com/mbj/mutant.svg)](https://gemnasium.com/mbj/mutant)
|
6
5
|
[![Code Climate](https://codeclimate.com/github/mbj/mutant.svg)](https://codeclimate.com/github/mbj/mutant)
|
7
6
|
[![Inline docs](http://inch-ci.org/github/mbj/mutant.svg)](http://inch-ci.org/github/mbj/mutant)
|
8
7
|
[![Gem Version](https://img.shields.io/gem/v/mutant.svg)](https://rubygems.org/gems/mutant)
|
9
|
-
[![Flattr](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/1823010/mbjmutant-on-GitHub)
|
10
8
|
[![Slack Status](https://mutation-testing-slack.herokuapp.com/badge.svg)](https://mutation-testing.slack.com/messages/mutant)
|
11
9
|
|
12
10
|
Mutant is a mutation testing tool for Ruby.
|
@@ -40,13 +38,13 @@ Examples
|
|
40
38
|
```
|
41
39
|
cd virtus
|
42
40
|
# Run mutant on virtus namespace
|
43
|
-
mutant --include lib --require virtus --use rspec Virtus*
|
41
|
+
bundle exec mutant --include lib --require virtus --use rspec Virtus*
|
44
42
|
# Run mutant on specific virtus class
|
45
|
-
mutant --include lib --require virtus --use rspec Virtus::Attribute
|
43
|
+
bundle exec mutant --include lib --require virtus --use rspec Virtus::Attribute
|
46
44
|
# Run mutant on specific virtus class method
|
47
|
-
mutant --include lib --require virtus --use rspec Virtus::Attribute.build
|
45
|
+
bundle exec mutant --include lib --require virtus --use rspec Virtus::Attribute.build
|
48
46
|
# Run mutant on specific virtus instance method
|
49
|
-
mutant --include lib --require virtus --use rspec Virtus::Attribute#type
|
47
|
+
bundle exec mutant --include lib --require virtus --use rspec Virtus::Attribute#type
|
50
48
|
```
|
51
49
|
|
52
50
|
Rails
|
@@ -66,7 +64,7 @@ Passing in RSpec Options
|
|
66
64
|
You can control some aspects of RSpec using the `SPEC_OPTS` environment variable as usual. If you want mutant to only pay attention to specs in a certain directory, you can run
|
67
65
|
|
68
66
|
```sh
|
69
|
-
SPEC_OPTS="--pattern spec/subdir_only/**/*_spec.rb" mutant --use rspec SomeClass
|
67
|
+
SPEC_OPTS="--pattern spec/subdir_only/**/*_spec.rb" bundle exec mutant --use rspec SomeClass
|
70
68
|
```
|
71
69
|
|
72
70
|
Limitations
|
@@ -257,7 +255,7 @@ Only Mutating Changed Code
|
|
257
255
|
|
258
256
|
Running mutant for the first time on an existing codebase can be a rather disheartening experience due to the large number of alive mutations found! Mutant has a setting that can help. Using the `--since` argument, mutant will only mutate code that has been modified. This allows you to introduce mutant into an existing code base without drowning in errors. Example usage that will mutate all code changed between master and the current branch:
|
259
257
|
```
|
260
|
-
mutant --include lib --require virtus --since master --use rspec Virtus::Attribute#type
|
258
|
+
bundle exec mutant --include lib --require virtus --since master --use rspec Virtus::Attribute#type
|
261
259
|
```
|
262
260
|
|
263
261
|
Known Problems
|
data/circle.yml
CHANGED
data/config/flay.yml
CHANGED
@@ -75,6 +75,7 @@ module Mutant
|
|
75
75
|
[:regexp_digit_type, [:type, :digit, '\d'], ::Regexp::Expression::CharacterType::Digit],
|
76
76
|
[:regexp_space_type, [:type, :space, '\s'], ::Regexp::Expression::CharacterType::Space],
|
77
77
|
[:regexp_word_type, [:type, :word, '\w'], ::Regexp::Expression::CharacterType::Word],
|
78
|
+
[:regexp_xgrapheme_type, [:type, :xgrapheme, '\X'], ::Regexp::Expression::CharacterType::ExtendedGrapheme],
|
78
79
|
[:regexp_hex_type, [:type, :hex, '\h'], ::Regexp::Expression::CharacterType::Hex],
|
79
80
|
[:regexp_nonhex_type, [:type, :nonhex, '\H'], ::Regexp::Expression::CharacterType::NonHex],
|
80
81
|
[:regexp_nondigit_type, [:type, :nondigit, '\D'], ::Regexp::Expression::CharacterType::NonDigit],
|
data/lib/mutant/ast/types.rb
CHANGED
data/lib/mutant/env/bootstrap.rb
CHANGED
@@ -34,6 +34,7 @@ module Mutant
|
|
34
34
|
@parser = Parser.new
|
35
35
|
infect
|
36
36
|
initialize_matchable_scopes
|
37
|
+
@integration = config.integration.new(config).setup
|
37
38
|
end
|
38
39
|
|
39
40
|
# Print warning message
|
@@ -99,7 +100,6 @@ module Mutant
|
|
99
100
|
def infect
|
100
101
|
config.includes.each(&config.load_path.method(:<<))
|
101
102
|
config.requires.each(&config.kernel.method(:require))
|
102
|
-
@integration = config.integration.new(config).setup
|
103
103
|
end
|
104
104
|
|
105
105
|
# Matched subjects
|
@@ -13,8 +13,16 @@ module Mutant
|
|
13
13
|
#
|
14
14
|
# @return [undefined]
|
15
15
|
def dispatch
|
16
|
+
mutate_type
|
16
17
|
emit_body_mutations if body
|
17
18
|
end
|
19
|
+
|
20
|
+
# Emit class -> type mutations
|
21
|
+
#
|
22
|
+
# @return [undefined]
|
23
|
+
def mutate_type
|
24
|
+
emit(s(:module, klass, body))
|
25
|
+
end
|
18
26
|
end # Class
|
19
27
|
end # Node
|
20
28
|
end # Mutator
|
@@ -9,7 +9,8 @@ module Mutant
|
|
9
9
|
regexp_hex_type: :regexp_nonhex_type,
|
10
10
|
regexp_space_type: :regexp_nonspace_type,
|
11
11
|
regexp_word_boundary_anchor: :regexp_nonword_boundary_anchor,
|
12
|
-
regexp_word_type: :regexp_nonword_type
|
12
|
+
regexp_word_type: :regexp_nonword_type,
|
13
|
+
regexp_xgrapheme_type: :regexp_space_type
|
13
14
|
}
|
14
15
|
|
15
16
|
MAP = IceNine.deep_freeze(map.merge(map.invert))
|
data/lib/mutant/version.rb
CHANGED
data/meta/class.rb
CHANGED
@@ -3,8 +3,17 @@ Mutant::Meta::Example.add :class do
|
|
3
3
|
|
4
4
|
mutation 'class Foo; nil; end'
|
5
5
|
mutation 'class Foo; self; end'
|
6
|
+
mutation 'module Foo; bar; end'
|
6
7
|
end
|
7
8
|
|
8
9
|
Mutant::Meta::Example.add :class do
|
9
10
|
source 'class Foo; end'
|
11
|
+
|
12
|
+
mutation 'module Foo; end'
|
13
|
+
end
|
14
|
+
|
15
|
+
Mutant::Meta::Example.add :class do
|
16
|
+
source 'class Foo < Baz; end'
|
17
|
+
|
18
|
+
mutation 'module Foo; end'
|
10
19
|
end
|
data/meta/def.rb
CHANGED
@@ -2,6 +2,7 @@ Mutant::Meta::Example.add :def do
|
|
2
2
|
source 'def foo; end'
|
3
3
|
|
4
4
|
mutation 'def foo; raise; end'
|
5
|
+
mutation 'def foo; super; end'
|
5
6
|
end
|
6
7
|
|
7
8
|
Mutant::Meta::Example.add :def do
|
@@ -14,6 +15,7 @@ Mutant::Meta::Example.add :def do
|
|
14
15
|
mutation 'def foo(a); nil; end'
|
15
16
|
mutation 'def foo(*b); nil; end'
|
16
17
|
mutation 'def foo(a, *b); b = []; nil; end'
|
18
|
+
mutation 'def foo(a, *b); super; end'
|
17
19
|
end
|
18
20
|
|
19
21
|
Mutant::Meta::Example.add :def do
|
@@ -25,6 +27,7 @@ Mutant::Meta::Example.add :def do
|
|
25
27
|
mutation 'def foo(a, *); raise; end'
|
26
28
|
mutation 'def foo(a); nil; end'
|
27
29
|
mutation 'def foo(*); nil; end'
|
30
|
+
mutation 'def foo(a, *); super; end'
|
28
31
|
end
|
29
32
|
|
30
33
|
Mutant::Meta::Example.add :def do
|
@@ -34,6 +37,7 @@ Mutant::Meta::Example.add :def do
|
|
34
37
|
mutation 'def foo; nil; rescue; end'
|
35
38
|
mutation 'def foo; self; rescue; end'
|
36
39
|
mutation 'def foo; end'
|
40
|
+
mutation 'def foo; super; end'
|
37
41
|
|
38
42
|
# Promote rescue resbody bodies
|
39
43
|
mutation 'def foo; foo; end'
|
@@ -65,6 +69,8 @@ Mutant::Meta::Example.add :def do
|
|
65
69
|
# Failing body
|
66
70
|
mutation 'def a; raise; end'
|
67
71
|
|
72
|
+
# Superclass implementation
|
73
|
+
mutation 'def a; super; end'
|
68
74
|
end
|
69
75
|
|
70
76
|
Mutant::Meta::Example.add :def do
|
@@ -85,6 +91,7 @@ Mutant::Meta::Example.add :def do
|
|
85
91
|
|
86
92
|
mutation 'def foo; raise; end'
|
87
93
|
|
94
|
+
mutation 'def foo; super; end'
|
88
95
|
end
|
89
96
|
|
90
97
|
Mutant::Meta::Example.add :def do
|
@@ -103,7 +110,7 @@ Mutant::Meta::Example.add :def do
|
|
103
110
|
|
104
111
|
# Mutation of body
|
105
112
|
mutation 'def foo(a, b); raise; end'
|
106
|
-
|
113
|
+
mutation 'def foo(a, b); super; end'
|
107
114
|
end
|
108
115
|
|
109
116
|
Mutant::Meta::Example.add :def do
|
@@ -120,6 +127,7 @@ Mutant::Meta::Example.add :def do
|
|
120
127
|
mutation 'def foo(b = nil); true; end'
|
121
128
|
mutation 'def foo(a, _b = nil); true; end'
|
122
129
|
mutation 'def foo(a, b); true; end'
|
130
|
+
mutation 'def foo(a, b = nil); super; end'
|
123
131
|
end
|
124
132
|
|
125
133
|
Mutant::Meta::Example.add :def do
|
@@ -127,6 +135,7 @@ Mutant::Meta::Example.add :def do
|
|
127
135
|
|
128
136
|
mutation 'def foo(_unused); raise; end'
|
129
137
|
mutation 'def foo; end'
|
138
|
+
mutation 'def foo(_unused); super; end'
|
130
139
|
end
|
131
140
|
|
132
141
|
Mutant::Meta::Example.add :def do
|
@@ -137,6 +146,7 @@ Mutant::Meta::Example.add :def do
|
|
137
146
|
mutation 'def foo(_unused = true); raise; end'
|
138
147
|
mutation 'def foo(_unused); end'
|
139
148
|
mutation 'def foo; end'
|
149
|
+
mutation 'def foo(_unused = true); super; end'
|
140
150
|
end
|
141
151
|
|
142
152
|
Mutant::Meta::Example.add :def do
|
@@ -158,6 +168,7 @@ Mutant::Meta::Example.add :def do
|
|
158
168
|
mutation 'def foo(a = 0, b = 0); a = 0; end'
|
159
169
|
mutation 'def foo(a = 0, b = 0); b = 0; end'
|
160
170
|
mutation 'def foo(a = 0, b = 0); raise; end'
|
171
|
+
mutation 'def foo(a = 0, b = 0); super; end'
|
161
172
|
end
|
162
173
|
|
163
174
|
Mutant::Meta::Example.add :def do
|
@@ -170,6 +181,7 @@ Mutant::Meta::Example.add :def do
|
|
170
181
|
mutation 'def foo(_a = true); end'
|
171
182
|
mutation 'def foo(a = true); raise; end'
|
172
183
|
mutation 'def foo(a = true); a = true; end'
|
184
|
+
mutation 'def foo(a = true); super; end'
|
173
185
|
end
|
174
186
|
|
175
187
|
Mutant::Meta::Example.add :def do
|
@@ -189,6 +201,8 @@ Mutant::Meta::Example.add :def do
|
|
189
201
|
mutation 'def self.foo; end'
|
190
202
|
|
191
203
|
mutation 'def self.foo; raise; end'
|
204
|
+
|
205
|
+
mutation 'def self.foo; super; end'
|
192
206
|
end
|
193
207
|
|
194
208
|
Mutant::Meta::Example.add :def do
|
@@ -208,4 +222,5 @@ Mutant::Meta::Example.add :def do
|
|
208
222
|
|
209
223
|
# Mutation of body
|
210
224
|
mutation 'def self.foo(a, b); raise; end'
|
225
|
+
mutation 'def self.foo(a, b); super; end'
|
211
226
|
end
|
data/meta/kwarg.rb
CHANGED
data/meta/kwoptarg.rb
CHANGED
@@ -3,7 +3,8 @@ mutations = {
|
|
3
3
|
[:regexp_hex_type, '/\h/'] => [:regexp_nonhex_type, '/\H/'],
|
4
4
|
[:regexp_space_type, '/\s/'] => [:regexp_nonspace_type, '/\S/'],
|
5
5
|
[:regexp_word_boundary_anchor, '/\b/'] => [:regexp_nonword_boundary_anchor, '/\B/'],
|
6
|
-
[:regexp_word_type, '/\w/'] => [:regexp_nonword_type, '/\W/']
|
6
|
+
[:regexp_word_type, '/\w/'] => [:regexp_nonword_type, '/\W/'],
|
7
|
+
[:regexp_xgrapheme_type, '/\X/'] => [:regexp_space_type, '/\s/']
|
7
8
|
}
|
8
9
|
|
9
10
|
mutations = mutations.merge(mutations.invert)
|
data/meta/rescue.rb
CHANGED
data/meta/restarg.rb
CHANGED
data/meta/send.rb
CHANGED
@@ -135,6 +135,13 @@ Mutant::Meta::Example.add :send do
|
|
135
135
|
mutation 'map'
|
136
136
|
end
|
137
137
|
|
138
|
+
Mutant::Meta::Example.add :send do
|
139
|
+
source 'to_i'
|
140
|
+
|
141
|
+
singleton_mutations
|
142
|
+
mutation 'to_int'
|
143
|
+
end
|
144
|
+
|
138
145
|
Mutant::Meta::Example.add :send do
|
139
146
|
source 'foo.to_s'
|
140
147
|
|
data/mutant-rspec.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.extra_rdoc_files = %w[LICENSE]
|
17
17
|
|
18
18
|
gem.add_runtime_dependency('mutant', "~> #{gem.version}")
|
19
|
-
gem.add_runtime_dependency('rspec-core', '>= 3.4.0', '< 3.
|
19
|
+
gem.add_runtime_dependency('rspec-core', '>= 3.4.0', '< 3.8.0')
|
20
20
|
|
21
21
|
gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
|
22
22
|
end
|
data/mutant.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |gem|
|
|
35
35
|
gem.add_runtime_dependency('equalizer', '~> 0.0.9')
|
36
36
|
gem.add_runtime_dependency('anima', '~> 0.3.0')
|
37
37
|
gem.add_runtime_dependency('concord', '~> 0.1.5')
|
38
|
-
gem.add_runtime_dependency('regexp_parser', '~> 0.4.
|
38
|
+
gem.add_runtime_dependency('regexp_parser', '~> 0.4.9')
|
39
39
|
|
40
40
|
gem.add_development_dependency('devtools', '~> 0.1.12')
|
41
41
|
gem.add_development_dependency('bundler', '~> 1.10')
|
@@ -2,7 +2,7 @@ RSpec.describe 'rspec integration', mutant: false do
|
|
2
2
|
|
3
3
|
let(:base_cmd) { 'bundle exec mutant -I lib --require test_app --use rspec' }
|
4
4
|
|
5
|
-
%w[3.4 3.5 3.6].each do |version|
|
5
|
+
%w[3.4 3.5 3.6 3.7].each do |version|
|
6
6
|
context "RSpec #{version}" do
|
7
7
|
let(:gemfile) { "Gemfile.rspec#{version}" }
|
8
8
|
|
data/spec/integrations.yml
CHANGED
@@ -15,16 +15,20 @@
|
|
15
15
|
- language/regexp/interpolation_spec.rb
|
16
16
|
'#<Regexp::Scanner::PrematureEndError: Premature end of pattern at \xA>':
|
17
17
|
- language/regexp/escapes_spec.rb
|
18
|
+
exclude:
|
19
|
+
- core/string/casecmp_spec.rb
|
20
|
+
- core/symbol/casecmp_spec.rb
|
18
21
|
- name: regexp_parser
|
19
22
|
namespace: Regexp
|
20
23
|
repo_uri: 'https://github.com/ammar/regexp_parser.git'
|
21
|
-
repo_ref: 'v0.4.
|
24
|
+
repo_ref: 'v0.4.4'
|
22
25
|
ruby_glob_pattern: '**/*.rb'
|
23
26
|
mutation_coverage: false
|
24
27
|
mutation_generation: true
|
25
28
|
expected_errors:
|
26
29
|
"Regexp::Syntax::Ruby::V233 does not implement: [escape:codepoint]":
|
27
30
|
- regexp_parser/test/parser/test_escapes.rb
|
31
|
+
exclude: []
|
28
32
|
- name: auom
|
29
33
|
namespace: AUOM
|
30
34
|
repo_uri: 'https://github.com/mbj/auom.git'
|
@@ -33,6 +37,7 @@
|
|
33
37
|
mutation_coverage: true
|
34
38
|
mutation_generation: true
|
35
39
|
expected_errors: {}
|
40
|
+
exclude: []
|
36
41
|
- name: axiom
|
37
42
|
namespace: Axiom
|
38
43
|
repo_uri: 'https://github.com/dkubb/axiom.git'
|
@@ -41,3 +46,4 @@
|
|
41
46
|
mutation_coverage: false
|
42
47
|
mutation_generation: true
|
43
48
|
expected_errors: {}
|
49
|
+
exclude: []
|
data/spec/support/corpus.rb
CHANGED
@@ -38,7 +38,8 @@ module MutantSpec
|
|
38
38
|
:namespace,
|
39
39
|
:repo_uri,
|
40
40
|
:repo_ref,
|
41
|
-
:ruby_glob_pattern
|
41
|
+
:ruby_glob_pattern,
|
42
|
+
:exclude
|
42
43
|
)
|
43
44
|
|
44
45
|
# Verify mutation coverage
|
@@ -175,6 +176,7 @@ module MutantSpec
|
|
175
176
|
.glob(repo_path.join(ruby_glob_pattern))
|
176
177
|
.sort_by(&:size)
|
177
178
|
.reverse
|
179
|
+
.reject { |path| exclude.include?(path.relative_path_from(repo_path).to_s) }
|
178
180
|
end
|
179
181
|
|
180
182
|
# Number of parallel processes to use
|
@@ -320,7 +322,8 @@ module MutantSpec
|
|
320
322
|
->(hash) { hash.map { |key, values| [key, values.map(&Pathname.method(:new))] }.to_h },
|
321
323
|
->(hash) { hash.map { |key, values| [key, values.map(&:to_s)] }.to_h }
|
322
324
|
]),
|
323
|
-
s(:load_attribute_hash, s(:param, ErrorWhitelist))))
|
325
|
+
s(:load_attribute_hash, s(:param, ErrorWhitelist)))),
|
326
|
+
s(:key_symbolize, :exclude, s(:map, s(:guard, s(:primitive, String))))),
|
324
327
|
s(:anima_load, Project))))
|
325
328
|
end
|
326
329
|
|
data/spec/support/warnings.yml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
|
+
- "lib/mutant/subject/method/instance.rb:9: warning: undefining `initialize' may cause serious problems"
|
2
3
|
- 'lib/parallel.rb:222: warning: shadowing outer local variable - args'
|
3
4
|
- 'lib/parallel.rb:227: warning: shadowing outer local variable - args'
|
4
5
|
- 'lib/parser/lexer.rb:10922: warning: assigned but unused variable - testEof'
|
5
|
-
- 'lib/regexp_parser/scanner.rb:
|
6
|
+
- 'lib/regexp_parser/scanner.rb:1675: warning: assigned but unused variable - testEof'
|
7
|
+
- 'lib/regexp_parser/scanner.rb:1689: warning: assigned but unused variable - testEof'
|
8
|
+
- 'lib/regexp_parser/scanner.rb:1692: warning: assigned but unused variable - testEof'
|
@@ -227,12 +227,7 @@ RegexpSpec.expect_mapping(/(?x-: # comment
|
|
227
227
|
)/, :regexp_comment_free_space) do
|
228
228
|
s(:regexp_root_expression,
|
229
229
|
s(:regexp_options_group, {
|
230
|
-
|
231
|
-
i: false,
|
232
|
-
x: true,
|
233
|
-
d: false,
|
234
|
-
a: false,
|
235
|
-
u: false
|
230
|
+
x: true
|
236
231
|
},
|
237
232
|
s(:regexp_whitespace_free_space, ' '),
|
238
233
|
s(:regexp_comment_free_space, "# comment\n")))
|
@@ -354,6 +349,11 @@ RegexpSpec.expect_mapping(/\H/, :regexp_hex_type) do
|
|
354
349
|
s(:regexp_nonhex_type))
|
355
350
|
end
|
356
351
|
|
352
|
+
RegexpSpec.expect_mapping(/\X/, :regexp_xgrapheme_type) do
|
353
|
+
s(:regexp_root_expression,
|
354
|
+
s(:regexp_xgrapheme_type))
|
355
|
+
end
|
356
|
+
|
357
357
|
RegexpSpec.expect_mapping(/\}/, :regexp_interval_close_escape) do
|
358
358
|
s(:regexp_root_expression,
|
359
359
|
s(:regexp_interval_close_escape))
|
@@ -480,12 +480,7 @@ RegexpSpec.expect_mapping(/(?i-:a)+/, :regexp_options_group) do
|
|
480
480
|
s(:regexp_greedy_one_or_more, 1, -1,
|
481
481
|
s(:regexp_options_group,
|
482
482
|
{
|
483
|
-
|
484
|
-
i: true,
|
485
|
-
x: false,
|
486
|
-
d: false,
|
487
|
-
a: false,
|
488
|
-
u: false
|
483
|
+
i: true
|
489
484
|
},
|
490
485
|
s(:regexp_literal_literal, 'a'))))
|
491
486
|
end
|
@@ -494,12 +489,7 @@ RegexpSpec.expect_mapping(/(?x-: #{"\n"} )/, :regexp_whitespace_free_space) do
|
|
494
489
|
s(:regexp_root_expression,
|
495
490
|
s(:regexp_options_group,
|
496
491
|
{
|
497
|
-
|
498
|
-
i: false,
|
499
|
-
x: true,
|
500
|
-
d: false,
|
501
|
-
a: false,
|
502
|
-
u: false
|
492
|
+
x: true
|
503
493
|
},
|
504
494
|
s(:regexp_whitespace_free_space, " \n ")))
|
505
495
|
end
|
@@ -116,6 +116,11 @@ RSpec.describe Mutant::Subject::Method::Instance::Memoized do
|
|
116
116
|
s(:begin,
|
117
117
|
s(:def, :foo, s(:args), s(:send, nil, :raise)), s(:send, nil, :memoize, s(:args, s(:sym, :foo))))
|
118
118
|
),
|
119
|
+
Mutant::Mutation::Evil.new(
|
120
|
+
object,
|
121
|
+
s(:begin,
|
122
|
+
s(:def, :foo, s(:args), s(:zsuper)), s(:send, nil, :memoize, s(:args, s(:sym, :foo))))
|
123
|
+
),
|
119
124
|
Mutant::Mutation::Evil.new(
|
120
125
|
object,
|
121
126
|
s(:begin,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -218,14 +218,14 @@ dependencies:
|
|
218
218
|
requirements:
|
219
219
|
- - "~>"
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: 0.4.
|
221
|
+
version: 0.4.9
|
222
222
|
type: :runtime
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
226
|
- - "~>"
|
227
227
|
- !ruby/object:Gem::Version
|
228
|
-
version: 0.4.
|
228
|
+
version: 0.4.9
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: devtools
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -660,6 +660,7 @@ files:
|
|
660
660
|
- test_app/Gemfile.rspec3.4
|
661
661
|
- test_app/Gemfile.rspec3.5
|
662
662
|
- test_app/Gemfile.rspec3.6
|
663
|
+
- test_app/Gemfile.rspec3.7
|
663
664
|
- test_app/lib/test_app.rb
|
664
665
|
- test_app/lib/test_app/literal.rb
|
665
666
|
- test_app/spec/spec_helper.rb
|
@@ -684,7 +685,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
684
685
|
version: '0'
|
685
686
|
requirements: []
|
686
687
|
rubyforge_project:
|
687
|
-
rubygems_version: 2.
|
688
|
+
rubygems_version: 2.7.7
|
688
689
|
signing_key:
|
689
690
|
specification_version: 4
|
690
691
|
summary: Mutation testing tool for ruby under MRI and Rubinius
|