mutant 0.10.21 → 0.10.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant.rb +1 -0
- data/lib/mutant/expression/namespace.rb +1 -1
- data/lib/mutant/mutator/node/block.rb +5 -1
- data/lib/mutant/mutator/node/kwargs.rb +34 -0
- data/lib/mutant/subject/method/instance.rb +1 -1
- data/lib/mutant/timer.rb +2 -2
- data/lib/mutant/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1672efb6d075c7efa99f9f45efad0e6362f082eda55943540ab02c7a8a6dbf9
|
4
|
+
data.tar.gz: cb419c57b1f7e2955c7b80bc3c59d604d197f3bf58732da72a8442e3023a4b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 016d92ae5cf2c2fc6c253cd7078583db2b9bee2ff01b14517f3ea12ded8a35e4cfe5df2647aa8d809144ab10c3d0d9bf56c66c1aaeeb1ee53c1e3facbcbca493
|
7
|
+
data.tar.gz: 8727a5a0520174b5c27464316eaff0130546ccabbc4dde3a0c45ca452ed0efdc46e3bccd2e52eaf01cc3fd5aacb041f3ef28783e98259d993a1f1a419a70b9eb
|
data/lib/mutant.rb
CHANGED
@@ -130,6 +130,7 @@ require 'mutant/mutator/node/rescue'
|
|
130
130
|
require 'mutant/mutator/node/match_current_line'
|
131
131
|
require 'mutant/mutator/node/index'
|
132
132
|
require 'mutant/mutator/node/procarg_zero'
|
133
|
+
require 'mutant/mutator/node/kwargs'
|
133
134
|
require 'mutant/loader'
|
134
135
|
require 'mutant/context'
|
135
136
|
require 'mutant/scope'
|
@@ -21,7 +21,7 @@ module Mutant
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def mutate_body
|
24
|
-
emit_body(nil)
|
24
|
+
emit_body(nil) unless unconditional_loop?
|
25
25
|
emit_body(N_RAISE)
|
26
26
|
|
27
27
|
return unless body
|
@@ -31,6 +31,10 @@ module Mutant
|
|
31
31
|
mutate_body_receiver
|
32
32
|
end
|
33
33
|
|
34
|
+
def unconditional_loop?
|
35
|
+
send.eql?(s(:send, nil, :loop))
|
36
|
+
end
|
37
|
+
|
34
38
|
def body_has_control?
|
35
39
|
AST.find_last_path(body) do |node|
|
36
40
|
n_break?(node) || n_next?(node)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mutant
|
4
|
+
class Mutator
|
5
|
+
class Node
|
6
|
+
# Mutator for kwargs node
|
7
|
+
class Kwargs < self
|
8
|
+
|
9
|
+
handle(:kwargs)
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def dispatch
|
14
|
+
emit_argument_presence
|
15
|
+
emit_argument_mutations
|
16
|
+
end
|
17
|
+
|
18
|
+
def emit_argument_presence
|
19
|
+
Util::Array::Presence.call(children).each do |children|
|
20
|
+
emit_type(*children)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def emit_argument_mutations
|
25
|
+
children.each_with_index do |child, index|
|
26
|
+
Mutator.mutate(child).each do |mutant|
|
27
|
+
emit_child_update(index, mutant)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end # Kwargs
|
32
|
+
end # Node
|
33
|
+
end # Mutator
|
34
|
+
end # Mutant
|
data/lib/mutant/timer.rb
CHANGED
data/lib/mutant/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 3.0.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 3.0.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: procto
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.5.
|
187
|
+
version: 0.5.6
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.5.
|
194
|
+
version: 0.5.6
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: variable
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,14 +268,14 @@ dependencies:
|
|
268
268
|
requirements:
|
269
269
|
- - "~>"
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version: '1.
|
271
|
+
version: '1.7'
|
272
272
|
type: :development
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
276
|
- - "~>"
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version: '1.
|
278
|
+
version: '1.7'
|
279
279
|
description: Mutation Testing for Ruby.
|
280
280
|
email:
|
281
281
|
- mbj@schirp-dso.com
|
@@ -366,6 +366,7 @@ files:
|
|
366
366
|
- lib/mutant/mutator/node/generic.rb
|
367
367
|
- lib/mutant/mutator/node/if.rb
|
368
368
|
- lib/mutant/mutator/node/index.rb
|
369
|
+
- lib/mutant/mutator/node/kwargs.rb
|
369
370
|
- lib/mutant/mutator/node/kwbegin.rb
|
370
371
|
- lib/mutant/mutator/node/literal.rb
|
371
372
|
- lib/mutant/mutator/node/literal/array.rb
|
@@ -473,7 +474,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
473
474
|
- !ruby/object:Gem::Version
|
474
475
|
version: '0'
|
475
476
|
requirements: []
|
476
|
-
rubygems_version: 3.
|
477
|
+
rubygems_version: 3.0.3
|
477
478
|
signing_key:
|
478
479
|
specification_version: 4
|
479
480
|
summary: ''
|