mutant 0.8.10 → 0.8.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -4
- data/Changelog.md +8 -0
- data/README.md +112 -43
- data/Rakefile +2 -16
- data/circle.yml +1 -1
- data/config/flay.yml +2 -2
- data/config/flog.yml +1 -1
- data/config/reek.yml +3 -4
- data/config/rubocop.yml +53 -16
- data/lib/mutant.rb +27 -6
- data/lib/mutant/ast/meta/const.rb +2 -0
- data/lib/mutant/ast/meta/optarg.rb +2 -0
- data/lib/mutant/ast/meta/resbody.rb +2 -0
- data/lib/mutant/ast/meta/restarg.rb +2 -0
- data/lib/mutant/ast/meta/send.rb +4 -0
- data/lib/mutant/ast/meta/symbol.rb +2 -0
- data/lib/mutant/ast/named_children.rb +14 -4
- data/lib/mutant/ast/nodes.rb +3 -1
- data/lib/mutant/ast/regexp.rb +53 -0
- data/lib/mutant/ast/regexp/transformer.rb +185 -0
- data/lib/mutant/ast/regexp/transformer/alternative.rb +39 -0
- data/lib/mutant/ast/regexp/transformer/character_set.rb +46 -0
- data/lib/mutant/ast/regexp/transformer/direct.rb +99 -0
- data/lib/mutant/ast/regexp/transformer/options_group.rb +66 -0
- data/lib/mutant/ast/regexp/transformer/quantifier.rb +112 -0
- data/lib/mutant/ast/regexp/transformer/recursive.rb +50 -0
- data/lib/mutant/ast/regexp/transformer/root.rb +29 -0
- data/lib/mutant/ast/regexp/transformer/text.rb +55 -0
- data/lib/mutant/ast/types.rb +92 -5
- data/lib/mutant/cli.rb +2 -14
- data/lib/mutant/color.rb +1 -1
- data/lib/mutant/config.rb +1 -3
- data/lib/mutant/expression/methods.rb +1 -1
- data/lib/mutant/expression/namespace.rb +2 -2
- data/lib/mutant/expression/parser.rb +1 -1
- data/lib/mutant/integration.rb +10 -28
- data/lib/mutant/isolation.rb +9 -60
- data/lib/mutant/isolation/fork.rb +72 -0
- data/lib/mutant/isolation/none.rb +25 -0
- data/lib/mutant/matcher/config.rb +2 -0
- data/lib/mutant/matcher/method/singleton.rb +5 -4
- data/lib/mutant/meta.rb +11 -4
- data/lib/mutant/meta/example.rb +2 -116
- data/lib/mutant/meta/example/dsl.rb +22 -19
- data/lib/mutant/meta/example/verification.rb +86 -0
- data/lib/mutant/mutator.rb +22 -49
- data/lib/mutant/mutator/node.rb +15 -19
- data/lib/mutant/mutator/node/and_asgn.rb +1 -1
- data/lib/mutant/mutator/node/argument.rb +10 -5
- data/lib/mutant/mutator/node/arguments.rb +5 -9
- data/lib/mutant/mutator/node/begin.rb +4 -17
- data/lib/mutant/mutator/node/block.rb +1 -1
- data/lib/mutant/mutator/node/break.rb +1 -1
- data/lib/mutant/mutator/node/class.rb +21 -0
- data/lib/mutant/mutator/node/conditional_loop.rb +1 -1
- data/lib/mutant/mutator/node/define.rb +1 -1
- data/lib/mutant/mutator/node/defined.rb +1 -1
- data/lib/mutant/mutator/node/dstr.rb +1 -1
- data/lib/mutant/mutator/node/dsym.rb +1 -1
- data/lib/mutant/mutator/node/generic.rb +3 -3
- data/lib/mutant/mutator/node/kwbegin.rb +1 -1
- data/lib/mutant/mutator/node/literal.rb +9 -0
- data/lib/mutant/mutator/node/literal/boolean.rb +1 -1
- data/lib/mutant/mutator/node/literal/fixnum.rb +2 -2
- data/lib/mutant/mutator/node/literal/float.rb +4 -6
- data/lib/mutant/mutator/node/literal/hash.rb +1 -1
- data/lib/mutant/mutator/node/literal/nil.rb +1 -1
- data/lib/mutant/mutator/node/literal/range.rb +2 -19
- data/lib/mutant/mutator/node/literal/regex.rb +43 -3
- data/lib/mutant/mutator/node/literal/string.rb +1 -1
- data/lib/mutant/mutator/node/literal/symbol.rb +2 -4
- data/lib/mutant/mutator/node/masgn.rb +1 -1
- data/lib/mutant/mutator/node/match_current_line.rb +1 -1
- data/lib/mutant/mutator/node/mlhs.rb +2 -3
- data/lib/mutant/mutator/node/named_value/access.rb +2 -2
- data/lib/mutant/mutator/node/named_value/constant_assignment.rb +4 -3
- data/lib/mutant/mutator/node/named_value/variable_assignment.rb +4 -4
- data/lib/mutant/mutator/node/next.rb +1 -1
- data/lib/mutant/mutator/node/nthref.rb +1 -1
- data/lib/mutant/mutator/node/or_asgn.rb +1 -1
- data/lib/mutant/mutator/node/regexp.rb +44 -0
- data/lib/mutant/mutator/node/regopt.rb +31 -0
- data/lib/mutant/mutator/node/resbody.rb +1 -1
- data/lib/mutant/mutator/node/rescue.rb +1 -3
- data/lib/mutant/mutator/node/return.rb +1 -1
- data/lib/mutant/mutator/node/send.rb +43 -3
- data/lib/mutant/mutator/node/send/attribute_assignment.rb +4 -1
- data/lib/mutant/mutator/node/send/conditional.rb +23 -0
- data/lib/mutant/mutator/node/send/index.rb +1 -1
- data/lib/mutant/mutator/node/splat.rb +1 -1
- data/lib/mutant/mutator/node/when.rb +1 -1
- data/lib/mutant/mutator/node/yield.rb +1 -1
- data/lib/mutant/mutator/util.rb +0 -30
- data/lib/mutant/mutator/util/array.rb +4 -16
- data/lib/mutant/parallel.rb +1 -1
- data/lib/mutant/parallel/worker.rb +1 -1
- data/lib/mutant/registry.rb +44 -0
- data/lib/mutant/reporter/cli/format.rb +2 -0
- data/lib/mutant/reporter/cli/printer.rb +2 -2
- data/lib/mutant/reporter/cli/printer/config.rb +0 -1
- data/lib/mutant/reporter/cli/printer/env_progress.rb +1 -11
- data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +1 -1
- data/lib/mutant/reporter/cli/printer/mutation_result.rb +2 -0
- data/lib/mutant/reporter/cli/tput.rb +1 -1
- data/lib/mutant/reporter/sequence.rb +3 -0
- data/lib/mutant/require_highjack.rb +6 -2
- data/lib/mutant/result.rb +1 -1
- data/lib/mutant/subject.rb +5 -5
- data/lib/mutant/subject/method/instance.rb +1 -2
- data/lib/mutant/util.rb +18 -0
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant/zombifier.rb +5 -3
- data/meta/and.rb +1 -1
- data/meta/and_asgn.rb +1 -1
- data/meta/array.rb +2 -2
- data/meta/begin.rb +2 -2
- data/meta/block.rb +7 -7
- data/meta/block_pass.rb +1 -1
- data/meta/blockarg.rb +1 -1
- data/meta/break.rb +1 -1
- data/meta/case.rb +2 -2
- data/meta/casgn.rb +11 -2
- data/meta/cbase.rb +1 -1
- data/meta/class.rb +10 -0
- data/meta/const.rb +9 -1
- data/meta/csend.rb +8 -0
- data/meta/cvar.rb +1 -1
- data/meta/cvasgn.rb +1 -1
- data/meta/date.rb +4 -4
- data/meta/def.rb +14 -14
- data/meta/defined.rb +1 -1
- data/meta/dstr.rb +1 -1
- data/meta/dsym.rb +1 -1
- data/meta/ensure.rb +1 -1
- data/meta/false.rb +1 -1
- data/meta/float.rb +3 -3
- data/meta/gvar.rb +1 -1
- data/meta/gvasgn.rb +1 -1
- data/meta/hash.rb +1 -1
- data/meta/if.rb +17 -3
- data/meta/int.rb +1 -1
- data/meta/ivar.rb +1 -1
- data/meta/ivasgn.rb +14 -1
- data/meta/kwarg.rb +8 -0
- data/meta/kwbegin.rb +1 -1
- data/meta/kwoptarg.rb +11 -0
- data/meta/lvar.rb +1 -1
- data/meta/lvasgn.rb +1 -1
- data/meta/masgn.rb +1 -1
- data/meta/match_current_line.rb +2 -2
- data/meta/next.rb +1 -1
- data/meta/nil.rb +1 -1
- data/meta/nthref.rb +5 -5
- data/meta/op_assgn.rb +1 -1
- data/meta/or.rb +1 -1
- data/meta/or_asgn.rb +5 -5
- data/meta/range.rb +2 -8
- data/meta/redo.rb +1 -1
- data/meta/regexp.rb +106 -0
- data/meta/regexp/regexp_bol_anchor.rb +13 -0
- data/meta/regexp/regexp_bos_anchor.rb +26 -0
- data/meta/regexp/regexp_root_expression.rb +13 -0
- data/meta/regopt.rb +8 -0
- data/meta/rescue.rb +49 -4
- data/meta/restarg.rb +6 -9
- data/meta/return.rb +2 -2
- data/meta/self.rb +1 -1
- data/meta/send.rb +228 -55
- data/meta/str.rb +1 -1
- data/meta/super.rb +3 -3
- data/meta/{symbol.rb → sym.rb} +1 -1
- data/meta/true.rb +1 -1
- data/meta/until.rb +1 -1
- data/meta/while.rb +2 -2
- data/meta/yield.rb +1 -1
- data/mutant-rspec.gemspec +2 -2
- data/mutant.gemspec +6 -5
- data/spec/integration/mutant/isolation/fork_spec.rb +8 -0
- data/spec/integration/mutant/rspec_spec.rb +1 -1
- data/spec/integration/mutant/test_mutator_handles_types_spec.rb +1 -2
- data/spec/integrations.yml +93 -24
- data/spec/spec_helper.rb +12 -7
- data/spec/support/compress_helper.rb +1 -1
- data/spec/support/corpus.rb +115 -50
- data/spec/support/fake_actor.rb +5 -5
- data/spec/support/file_system.rb +1 -1
- data/spec/support/ice_nine_config.rb +3 -3
- data/spec/support/ruby_vm.rb +11 -12
- data/spec/support/shared_context.rb +22 -13
- data/spec/support/test_app.rb +1 -1
- data/spec/support/warning.rb +64 -0
- data/spec/support/warnings.yml +4 -0
- data/spec/support/xspec.rb +177 -0
- data/spec/unit/mutant/actor/env_spec.rb +2 -2
- data/spec/unit/mutant/actor/sender_spec.rb +1 -1
- data/spec/unit/mutant/ast/meta/send_spec.rb +1 -1
- data/spec/unit/mutant/ast/named_children_spec.rb +26 -0
- data/spec/unit/mutant/ast/regexp/parse_spec.rb +7 -0
- data/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb +14 -0
- data/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb +19 -0
- data/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb +33 -0
- data/spec/unit/mutant/ast/regexp/transformer_spec.rb +19 -0
- data/spec/unit/mutant/ast/regexp_spec.rb +617 -0
- data/spec/unit/mutant/cli_spec.rb +7 -45
- data/spec/unit/mutant/context_spec.rb +4 -7
- data/spec/unit/mutant/env/{boostrap_spec.rb → bootstrap_spec.rb} +2 -2
- data/spec/unit/mutant/env_spec.rb +13 -16
- data/spec/unit/mutant/expression/namespace/{flat_spec.rb → exact_spec.rb} +0 -0
- data/spec/unit/mutant/integration/rspec_spec.rb +2 -2
- data/spec/unit/mutant/integration_spec.rb +14 -0
- data/spec/unit/mutant/isolation/fork_spec.rb +155 -0
- data/spec/unit/mutant/isolation/none_spec.rb +16 -0
- data/spec/unit/mutant/loader_spec.rb +1 -1
- data/spec/unit/mutant/matcher/methods/instance_spec.rb +2 -4
- data/spec/unit/mutant/meta/example/dsl_spec.rb +106 -0
- data/spec/unit/mutant/meta/example/verification_spec.rb +120 -0
- data/spec/unit/mutant/meta/example_spec.rb +32 -0
- data/spec/unit/mutant/mutator/node_spec.rb +37 -4
- data/spec/unit/mutant/mutator_spec.rb +21 -0
- data/spec/unit/mutant/{runner → parallel}/driver_spec.rb +0 -0
- data/spec/unit/mutant/parallel/master_spec.rb +13 -13
- data/spec/unit/mutant/registry_spec.rb +47 -0
- data/spec/unit/mutant/reporter/cli/printer/config_spec.rb +0 -4
- data/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb +0 -8
- data/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +0 -2
- data/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb +0 -8
- data/spec/unit/mutant/reporter/cli/printer/status_spec.rb +0 -34
- data/spec/unit/mutant/reporter/cli_spec.rb +0 -22
- data/spec/unit/mutant/repository/diff_spec.rb +6 -6
- data/spec/unit/mutant/require_highjack_spec.rb +38 -14
- data/spec/unit/mutant/result/env_spec.rb +1 -4
- data/spec/unit/mutant/runner_spec.rb +1 -1
- data/spec/unit/mutant/subject/method/instance_spec.rb +1 -1
- data/spec/unit/mutant/subject_spec.rb +3 -3
- data/spec/unit/mutant/util/one_spec.rb +20 -0
- data/spec/unit/mutant/zombifier_spec.rb +18 -18
- data/test_app/{Gemfile.rspec3.3 → Gemfile.rspec3.5} +2 -2
- metadata +94 -24
- data/TODO +0 -21
- data/lib/mutant/mutator/node/blockarg.rb +0 -13
- data/lib/mutant/mutator/node/restarg.rb +0 -13
- data/lib/mutant/mutator/registry.rb +0 -49
- data/meta/boolean.rb +0 -13
- data/meta/regex.rb +0 -19
- data/spec/unit/mutant/isolation_spec.rb +0 -104
- data/spec/unit/mutant/mutator/registry_spec.rb +0 -57
data/meta/restarg.rb
CHANGED
@@ -1,11 +1,8 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
2
|
-
source 'foo(*bar)'
|
1
|
+
Mutant::Meta::Example.add :restarg do
|
2
|
+
source 'def foo(*bar); end'
|
3
3
|
|
4
|
-
|
5
|
-
mutation 'foo'
|
6
|
-
mutation 'foo(
|
7
|
-
mutation 'foo
|
8
|
-
mutation 'foo(*self)'
|
9
|
-
mutation 'foo(bar)'
|
10
|
-
mutation 'foo(*nil)'
|
4
|
+
mutation 'def foo; end'
|
5
|
+
mutation 'def foo(*bar); bar = []; end'
|
6
|
+
mutation 'def foo(*bar); raise; end'
|
7
|
+
mutation 'remove_method(:foo)'
|
11
8
|
end
|
data/meta/return.rb
CHANGED
data/meta/self.rb
CHANGED
data/meta/send.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :send do
|
2
2
|
source 'a > b'
|
3
3
|
|
4
4
|
singleton_mutations
|
@@ -14,7 +14,7 @@ Mutant::Meta::Example.add do
|
|
14
14
|
mutation 'b'
|
15
15
|
end
|
16
16
|
|
17
|
-
Mutant::Meta::Example.add do
|
17
|
+
Mutant::Meta::Example.add :send do
|
18
18
|
source 'A.const_get(:B)'
|
19
19
|
|
20
20
|
singleton_mutations
|
@@ -28,7 +28,7 @@ Mutant::Meta::Example.add do
|
|
28
28
|
mutation 'self.const_get(:B)'
|
29
29
|
end
|
30
30
|
|
31
|
-
Mutant::Meta::Example.add do
|
31
|
+
Mutant::Meta::Example.add :send do
|
32
32
|
source 'A.const_get(bar)'
|
33
33
|
|
34
34
|
singleton_mutations
|
@@ -40,7 +40,18 @@ Mutant::Meta::Example.add do
|
|
40
40
|
mutation 'self.const_get(bar)'
|
41
41
|
end
|
42
42
|
|
43
|
-
Mutant::Meta::Example.add do
|
43
|
+
Mutant::Meta::Example.add :send do
|
44
|
+
source 'method(bar)'
|
45
|
+
|
46
|
+
singleton_mutations
|
47
|
+
mutation 'public_method(bar)'
|
48
|
+
mutation 'method'
|
49
|
+
mutation 'bar'
|
50
|
+
mutation 'method(nil)'
|
51
|
+
mutation 'method(self)'
|
52
|
+
end
|
53
|
+
|
54
|
+
Mutant::Meta::Example.add :send do
|
44
55
|
source 'a >= b'
|
45
56
|
|
46
57
|
singleton_mutations
|
@@ -56,7 +67,7 @@ Mutant::Meta::Example.add do
|
|
56
67
|
mutation 'b'
|
57
68
|
end
|
58
69
|
|
59
|
-
Mutant::Meta::Example.add do
|
70
|
+
Mutant::Meta::Example.add :send do
|
60
71
|
source 'a <= b'
|
61
72
|
|
62
73
|
singleton_mutations
|
@@ -72,7 +83,7 @@ Mutant::Meta::Example.add do
|
|
72
83
|
mutation 'b'
|
73
84
|
end
|
74
85
|
|
75
|
-
Mutant::Meta::Example.add do
|
86
|
+
Mutant::Meta::Example.add :send do
|
76
87
|
source 'a < b'
|
77
88
|
|
78
89
|
singleton_mutations
|
@@ -88,21 +99,21 @@ Mutant::Meta::Example.add do
|
|
88
99
|
mutation 'b'
|
89
100
|
end
|
90
101
|
|
91
|
-
Mutant::Meta::Example.add do
|
102
|
+
Mutant::Meta::Example.add :send do
|
92
103
|
source 'reverse_each'
|
93
104
|
|
94
105
|
singleton_mutations
|
95
106
|
mutation 'each'
|
96
107
|
end
|
97
108
|
|
98
|
-
Mutant::Meta::Example.add do
|
109
|
+
Mutant::Meta::Example.add :send do
|
99
110
|
source 'reverse_merge'
|
100
111
|
|
101
112
|
singleton_mutations
|
102
113
|
mutation 'merge'
|
103
114
|
end
|
104
115
|
|
105
|
-
Mutant::Meta::Example.add do
|
116
|
+
Mutant::Meta::Example.add :send do
|
106
117
|
source 'reverse_map'
|
107
118
|
|
108
119
|
singleton_mutations
|
@@ -110,14 +121,14 @@ Mutant::Meta::Example.add do
|
|
110
121
|
mutation 'each'
|
111
122
|
end
|
112
123
|
|
113
|
-
Mutant::Meta::Example.add do
|
124
|
+
Mutant::Meta::Example.add :send do
|
114
125
|
source 'map'
|
115
126
|
|
116
127
|
singleton_mutations
|
117
128
|
mutation 'each'
|
118
129
|
end
|
119
130
|
|
120
|
-
Mutant::Meta::Example.add do
|
131
|
+
Mutant::Meta::Example.add :send do
|
121
132
|
source 'foo.to_s'
|
122
133
|
|
123
134
|
singleton_mutations
|
@@ -126,16 +137,17 @@ Mutant::Meta::Example.add do
|
|
126
137
|
mutation 'foo.to_str'
|
127
138
|
end
|
128
139
|
|
129
|
-
Mutant::Meta::Example.add do
|
140
|
+
Mutant::Meta::Example.add :send do
|
130
141
|
source 'foo.to_a'
|
131
142
|
|
132
143
|
singleton_mutations
|
133
144
|
mutation 'foo'
|
134
145
|
mutation 'self.to_a'
|
135
146
|
mutation 'foo.to_ary'
|
147
|
+
mutation 'foo.to_set'
|
136
148
|
end
|
137
149
|
|
138
|
-
Mutant::Meta::Example.add do
|
150
|
+
Mutant::Meta::Example.add :send do
|
139
151
|
source 'foo.to_i'
|
140
152
|
|
141
153
|
singleton_mutations
|
@@ -145,7 +157,7 @@ Mutant::Meta::Example.add do
|
|
145
157
|
mutation 'Integer(foo)'
|
146
158
|
end
|
147
159
|
|
148
|
-
Mutant::Meta::Example.add do
|
160
|
+
Mutant::Meta::Example.add :send do
|
149
161
|
source 'foo.to_h'
|
150
162
|
|
151
163
|
singleton_mutations
|
@@ -154,7 +166,7 @@ Mutant::Meta::Example.add do
|
|
154
166
|
mutation 'foo.to_hash'
|
155
167
|
end
|
156
168
|
|
157
|
-
Mutant::Meta::Example.add do
|
169
|
+
Mutant::Meta::Example.add :send do
|
158
170
|
source 'foo == bar'
|
159
171
|
|
160
172
|
singleton_mutations
|
@@ -168,7 +180,7 @@ Mutant::Meta::Example.add do
|
|
168
180
|
mutation 'foo.equal?(bar)'
|
169
181
|
end
|
170
182
|
|
171
|
-
Mutant::Meta::Example.add do
|
183
|
+
Mutant::Meta::Example.add :send do
|
172
184
|
source 'foo.is_a?(bar)'
|
173
185
|
|
174
186
|
singleton_mutations
|
@@ -181,7 +193,7 @@ Mutant::Meta::Example.add do
|
|
181
193
|
mutation 'foo.instance_of?(bar)'
|
182
194
|
end
|
183
195
|
|
184
|
-
Mutant::Meta::Example.add do
|
196
|
+
Mutant::Meta::Example.add :send do
|
185
197
|
source 'foo.is_a?(bar)'
|
186
198
|
|
187
199
|
singleton_mutations
|
@@ -194,7 +206,7 @@ Mutant::Meta::Example.add do
|
|
194
206
|
mutation 'foo.instance_of?(bar)'
|
195
207
|
end
|
196
208
|
|
197
|
-
Mutant::Meta::Example.add do
|
209
|
+
Mutant::Meta::Example.add :send do
|
198
210
|
source 'foo.kind_of?(bar)'
|
199
211
|
|
200
212
|
singleton_mutations
|
@@ -207,7 +219,7 @@ Mutant::Meta::Example.add do
|
|
207
219
|
mutation 'foo.instance_of?(bar)'
|
208
220
|
end
|
209
221
|
|
210
|
-
Mutant::Meta::Example.add do
|
222
|
+
Mutant::Meta::Example.add :send do
|
211
223
|
source 'foo.gsub(a, b)'
|
212
224
|
|
213
225
|
singleton_mutations
|
@@ -223,7 +235,7 @@ Mutant::Meta::Example.add do
|
|
223
235
|
mutation 'self.gsub(a, b)'
|
224
236
|
end
|
225
237
|
|
226
|
-
Mutant::Meta::Example.add do
|
238
|
+
Mutant::Meta::Example.add :send do
|
227
239
|
source 'foo.values_at(a, b)'
|
228
240
|
|
229
241
|
singleton_mutations
|
@@ -239,7 +251,44 @@ Mutant::Meta::Example.add do
|
|
239
251
|
mutation 'foo.values_at'
|
240
252
|
end
|
241
253
|
|
242
|
-
Mutant::Meta::Example.add do
|
254
|
+
Mutant::Meta::Example.add :send do
|
255
|
+
source 'foo.dig(a, b)'
|
256
|
+
|
257
|
+
singleton_mutations
|
258
|
+
mutation 'foo.fetch(a).dig(b)'
|
259
|
+
mutation 'foo'
|
260
|
+
mutation 'self.dig(a, b)'
|
261
|
+
mutation 'foo.dig(a)'
|
262
|
+
mutation 'foo.dig(b)'
|
263
|
+
mutation 'foo.dig(nil, b)'
|
264
|
+
mutation 'foo.dig(self, b)'
|
265
|
+
mutation 'foo.dig(a, nil)'
|
266
|
+
mutation 'foo.dig(a, self)'
|
267
|
+
mutation 'foo.dig'
|
268
|
+
end
|
269
|
+
|
270
|
+
Mutant::Meta::Example.add :send do
|
271
|
+
source 'foo.dig(a)'
|
272
|
+
|
273
|
+
singleton_mutations
|
274
|
+
mutation 'foo.fetch(a)'
|
275
|
+
mutation 'foo'
|
276
|
+
mutation 'self.dig(a)'
|
277
|
+
mutation 'foo.dig(nil)'
|
278
|
+
mutation 'foo.dig(self)'
|
279
|
+
mutation 'foo.dig'
|
280
|
+
mutation 'a'
|
281
|
+
end
|
282
|
+
|
283
|
+
Mutant::Meta::Example.add :send do
|
284
|
+
source 'foo.dig'
|
285
|
+
|
286
|
+
singleton_mutations
|
287
|
+
mutation 'foo'
|
288
|
+
mutation 'self.dig'
|
289
|
+
end
|
290
|
+
|
291
|
+
Mutant::Meta::Example.add :send do
|
243
292
|
source 'foo.__send__(bar)'
|
244
293
|
|
245
294
|
singleton_mutations
|
@@ -252,7 +301,7 @@ Mutant::Meta::Example.add do
|
|
252
301
|
mutation 'foo.__send__(self)'
|
253
302
|
end
|
254
303
|
|
255
|
-
Mutant::Meta::Example.add do
|
304
|
+
Mutant::Meta::Example.add :send do
|
256
305
|
source 'foo.send(bar)'
|
257
306
|
|
258
307
|
singleton_mutations
|
@@ -266,31 +315,29 @@ Mutant::Meta::Example.add do
|
|
266
315
|
mutation 'foo.send(self)'
|
267
316
|
end
|
268
317
|
|
269
|
-
Mutant::Meta::Example.add do
|
270
|
-
source 'self.
|
318
|
+
Mutant::Meta::Example.add :send do
|
319
|
+
source 'self.booz = baz'
|
271
320
|
|
272
321
|
singleton_mutations
|
273
|
-
mutation 'self.
|
274
|
-
mutation 'self.
|
275
|
-
mutation 'self.
|
322
|
+
mutation 'self.booz = nil'
|
323
|
+
mutation 'self.booz = self'
|
324
|
+
mutation 'self.booz'
|
276
325
|
mutation 'baz'
|
277
|
-
# This one could probably be removed
|
278
326
|
end
|
279
327
|
|
280
|
-
Mutant::Meta::Example.add do
|
281
|
-
source 'foo.
|
328
|
+
Mutant::Meta::Example.add :send do
|
329
|
+
source 'foo.booz = baz'
|
282
330
|
|
283
331
|
singleton_mutations
|
284
332
|
mutation 'foo'
|
285
|
-
mutation 'foo.
|
286
|
-
mutation 'foo.
|
287
|
-
mutation 'self.
|
288
|
-
mutation 'foo.
|
333
|
+
mutation 'foo.booz = nil'
|
334
|
+
mutation 'foo.booz = self'
|
335
|
+
mutation 'self.booz = baz'
|
336
|
+
mutation 'foo.booz'
|
289
337
|
mutation 'baz'
|
290
|
-
# This one could probably be removed
|
291
338
|
end
|
292
339
|
|
293
|
-
Mutant::Meta::Example.add do
|
340
|
+
Mutant::Meta::Example.add :send do
|
294
341
|
source 'foo[bar] = baz'
|
295
342
|
|
296
343
|
singleton_mutations
|
@@ -304,7 +351,7 @@ Mutant::Meta::Example.add do
|
|
304
351
|
mutation 'baz'
|
305
352
|
end
|
306
353
|
|
307
|
-
Mutant::Meta::Example.add do
|
354
|
+
Mutant::Meta::Example.add :send do
|
308
355
|
source 'foo(*bar)'
|
309
356
|
|
310
357
|
singleton_mutations
|
@@ -316,20 +363,20 @@ Mutant::Meta::Example.add do
|
|
316
363
|
mutation 'foo(*self)'
|
317
364
|
end
|
318
365
|
|
319
|
-
Mutant::Meta::Example.add do
|
366
|
+
Mutant::Meta::Example.add :send do
|
320
367
|
source 'foo(&bar)'
|
321
368
|
|
322
369
|
singleton_mutations
|
323
370
|
mutation 'foo'
|
324
371
|
end
|
325
372
|
|
326
|
-
Mutant::Meta::Example.add do
|
373
|
+
Mutant::Meta::Example.add :send do
|
327
374
|
source 'foo'
|
328
375
|
|
329
376
|
singleton_mutations
|
330
377
|
end
|
331
378
|
|
332
|
-
Mutant::Meta::Example.add do
|
379
|
+
Mutant::Meta::Example.add :send do
|
333
380
|
source 'self.foo'
|
334
381
|
|
335
382
|
singleton_mutations
|
@@ -337,14 +384,14 @@ Mutant::Meta::Example.add do
|
|
337
384
|
end
|
338
385
|
|
339
386
|
Unparser::Constants::KEYWORDS.each do |keyword|
|
340
|
-
Mutant::Meta::Example.add do
|
387
|
+
Mutant::Meta::Example.add :send do
|
341
388
|
source "self.#{keyword}"
|
342
389
|
|
343
390
|
singleton_mutations
|
344
391
|
end
|
345
392
|
end
|
346
393
|
|
347
|
-
Mutant::Meta::Example.add do
|
394
|
+
Mutant::Meta::Example.add :send do
|
348
395
|
source 'foo.bar'
|
349
396
|
|
350
397
|
singleton_mutations
|
@@ -352,7 +399,7 @@ Mutant::Meta::Example.add do
|
|
352
399
|
mutation 'self.bar'
|
353
400
|
end
|
354
401
|
|
355
|
-
Mutant::Meta::Example.add do
|
402
|
+
Mutant::Meta::Example.add :send do
|
356
403
|
source 'self.class.foo'
|
357
404
|
|
358
405
|
singleton_mutations
|
@@ -360,14 +407,14 @@ Mutant::Meta::Example.add do
|
|
360
407
|
mutation 'self.foo'
|
361
408
|
end
|
362
409
|
|
363
|
-
Mutant::Meta::Example.add do
|
410
|
+
Mutant::Meta::Example.add :send do
|
364
411
|
source 'foo(nil)'
|
365
412
|
|
366
413
|
singleton_mutations
|
367
414
|
mutation 'foo'
|
368
415
|
end
|
369
416
|
|
370
|
-
Mutant::Meta::Example.add do
|
417
|
+
Mutant::Meta::Example.add :send do
|
371
418
|
source 'self.foo(nil)'
|
372
419
|
|
373
420
|
singleton_mutations
|
@@ -375,7 +422,7 @@ Mutant::Meta::Example.add do
|
|
375
422
|
mutation 'foo(nil)'
|
376
423
|
end
|
377
424
|
|
378
|
-
Mutant::Meta::Example.add do
|
425
|
+
Mutant::Meta::Example.add :send do
|
379
426
|
source 'self.fetch(nil)'
|
380
427
|
|
381
428
|
singleton_mutations
|
@@ -385,7 +432,7 @@ Mutant::Meta::Example.add do
|
|
385
432
|
end
|
386
433
|
|
387
434
|
Unparser::Constants::KEYWORDS.each do |keyword|
|
388
|
-
Mutant::Meta::Example.add do
|
435
|
+
Mutant::Meta::Example.add :send do
|
389
436
|
source "foo.#{keyword}(nil)"
|
390
437
|
|
391
438
|
singleton_mutations
|
@@ -395,7 +442,7 @@ Unparser::Constants::KEYWORDS.each do |keyword|
|
|
395
442
|
end
|
396
443
|
end
|
397
444
|
|
398
|
-
Mutant::Meta::Example.add do
|
445
|
+
Mutant::Meta::Example.add :send do
|
399
446
|
source 'foo(nil, nil)'
|
400
447
|
|
401
448
|
singleton_mutations
|
@@ -403,7 +450,7 @@ Mutant::Meta::Example.add do
|
|
403
450
|
mutation 'foo(nil)'
|
404
451
|
end
|
405
452
|
|
406
|
-
Mutant::Meta::Example.add do
|
453
|
+
Mutant::Meta::Example.add :send do
|
407
454
|
source '(left - right) / foo'
|
408
455
|
|
409
456
|
singleton_mutations
|
@@ -421,7 +468,7 @@ Mutant::Meta::Example.add do
|
|
421
468
|
mutation 'self / foo'
|
422
469
|
end
|
423
470
|
|
424
|
-
Mutant::Meta::Example.add do
|
471
|
+
Mutant::Meta::Example.add :send do
|
425
472
|
source 'foo[1]'
|
426
473
|
|
427
474
|
singleton_mutations
|
@@ -439,7 +486,7 @@ Mutant::Meta::Example.add do
|
|
439
486
|
mutation 'foo[self]'
|
440
487
|
end
|
441
488
|
|
442
|
-
Mutant::Meta::Example.add do
|
489
|
+
Mutant::Meta::Example.add :send do
|
443
490
|
source 'self.foo[]'
|
444
491
|
|
445
492
|
singleton_mutations
|
@@ -451,7 +498,97 @@ Mutant::Meta::Example.add do
|
|
451
498
|
mutation 'foo[]'
|
452
499
|
end
|
453
500
|
|
454
|
-
Mutant::Meta::Example.add do
|
501
|
+
Mutant::Meta::Example.add :send do
|
502
|
+
source 'foo(n..-1)'
|
503
|
+
|
504
|
+
singleton_mutations
|
505
|
+
mutation 'foo'
|
506
|
+
mutation 'n..-1'
|
507
|
+
mutation 'foo(nil)'
|
508
|
+
mutation 'foo(self)'
|
509
|
+
mutation 'foo(n...-1)'
|
510
|
+
mutation 'foo(nil..-1)'
|
511
|
+
mutation 'foo(self..-1)'
|
512
|
+
mutation 'foo(n..nil)'
|
513
|
+
mutation 'foo(n..self)'
|
514
|
+
mutation 'foo(n..0)'
|
515
|
+
mutation 'foo(n..1)'
|
516
|
+
mutation 'foo(n..-2)'
|
517
|
+
end
|
518
|
+
|
519
|
+
Mutant::Meta::Example.add :send do
|
520
|
+
source 'foo[n..-2]'
|
521
|
+
|
522
|
+
singleton_mutations
|
523
|
+
mutation 'n..-2'
|
524
|
+
mutation 'foo'
|
525
|
+
mutation 'foo[]'
|
526
|
+
mutation 'foo.at(n..-2)'
|
527
|
+
mutation 'foo.fetch(n..-2)'
|
528
|
+
mutation 'foo.key?(n..-2)'
|
529
|
+
mutation 'self[n..-2]'
|
530
|
+
mutation 'foo[nil]'
|
531
|
+
mutation 'foo[self]'
|
532
|
+
mutation 'foo[n..nil]'
|
533
|
+
mutation 'foo[n..self]'
|
534
|
+
mutation 'foo[n..-1]'
|
535
|
+
mutation 'foo[n..2]'
|
536
|
+
mutation 'foo[n..0]'
|
537
|
+
mutation 'foo[n..1]'
|
538
|
+
mutation 'foo[n..-3]'
|
539
|
+
mutation 'foo[n...-2]'
|
540
|
+
mutation 'foo[nil..-2]'
|
541
|
+
mutation 'foo[self..-2]'
|
542
|
+
end
|
543
|
+
|
544
|
+
Mutant::Meta::Example.add :send do
|
545
|
+
source 'foo[n...-1]'
|
546
|
+
|
547
|
+
singleton_mutations
|
548
|
+
mutation 'n...-1'
|
549
|
+
mutation 'foo'
|
550
|
+
mutation 'foo[]'
|
551
|
+
mutation 'foo.at(n...-1)'
|
552
|
+
mutation 'foo.fetch(n...-1)'
|
553
|
+
mutation 'foo.key?(n...-1)'
|
554
|
+
mutation 'self[n...-1]'
|
555
|
+
mutation 'foo[nil]'
|
556
|
+
mutation 'foo[self]'
|
557
|
+
mutation 'foo[n...nil]'
|
558
|
+
mutation 'foo[n...self]'
|
559
|
+
mutation 'foo[n..-1]'
|
560
|
+
mutation 'foo[n...0]'
|
561
|
+
mutation 'foo[n...1]'
|
562
|
+
mutation 'foo[n...-2]'
|
563
|
+
mutation 'foo[nil...-1]'
|
564
|
+
mutation 'foo[self...-1]'
|
565
|
+
end
|
566
|
+
|
567
|
+
Mutant::Meta::Example.add :send do
|
568
|
+
source 'foo[n..-1]'
|
569
|
+
|
570
|
+
singleton_mutations
|
571
|
+
mutation 'n..-1'
|
572
|
+
mutation 'foo'
|
573
|
+
mutation 'foo[]'
|
574
|
+
mutation 'foo.at(n..-1)'
|
575
|
+
mutation 'foo.fetch(n..-1)'
|
576
|
+
mutation 'foo.key?(n..-1)'
|
577
|
+
mutation 'self[n..-1]'
|
578
|
+
mutation 'foo[nil]'
|
579
|
+
mutation 'foo[self]'
|
580
|
+
mutation 'foo[n..nil]'
|
581
|
+
mutation 'foo[n..self]'
|
582
|
+
mutation 'foo[n..0]'
|
583
|
+
mutation 'foo[n..1]'
|
584
|
+
mutation 'foo[n..-2]'
|
585
|
+
mutation 'foo[n...-1]'
|
586
|
+
mutation 'foo[nil..-1]'
|
587
|
+
mutation 'foo[self..-1]'
|
588
|
+
mutation 'foo.drop(n)'
|
589
|
+
end
|
590
|
+
|
591
|
+
Mutant::Meta::Example.add :send do
|
455
592
|
source 'self[foo]'
|
456
593
|
|
457
594
|
singleton_mutations
|
@@ -464,7 +601,7 @@ Mutant::Meta::Example.add do
|
|
464
601
|
mutation 'foo'
|
465
602
|
end
|
466
603
|
|
467
|
-
Mutant::Meta::Example.add do
|
604
|
+
Mutant::Meta::Example.add :send do
|
468
605
|
source 'foo[*bar]'
|
469
606
|
|
470
607
|
singleton_mutations
|
@@ -482,7 +619,7 @@ Mutant::Meta::Example.add do
|
|
482
619
|
end
|
483
620
|
|
484
621
|
(Mutant::AST::Types::BINARY_METHOD_OPERATORS - %i[<= >= < > == != eql?]).each do |operator|
|
485
|
-
Mutant::Meta::Example.add do
|
622
|
+
Mutant::Meta::Example.add :send do
|
486
623
|
source "true #{operator} false"
|
487
624
|
|
488
625
|
singleton_mutations
|
@@ -495,7 +632,7 @@ end
|
|
495
632
|
end
|
496
633
|
end
|
497
634
|
|
498
|
-
Mutant::Meta::Example.add do
|
635
|
+
Mutant::Meta::Example.add :send do
|
499
636
|
source 'a != b'
|
500
637
|
|
501
638
|
singleton_mutations
|
@@ -508,3 +645,39 @@ Mutant::Meta::Example.add do
|
|
508
645
|
mutation '!a.eql?(b)'
|
509
646
|
mutation '!a.equal?(b)'
|
510
647
|
end
|
648
|
+
|
649
|
+
Mutant::Meta::Example.add :send do
|
650
|
+
source 'sample'
|
651
|
+
|
652
|
+
singleton_mutations
|
653
|
+
mutation 'first'
|
654
|
+
mutation 'last'
|
655
|
+
end
|
656
|
+
|
657
|
+
Mutant::Meta::Example.add :send do
|
658
|
+
source 'pop'
|
659
|
+
|
660
|
+
singleton_mutations
|
661
|
+
mutation 'last'
|
662
|
+
end
|
663
|
+
|
664
|
+
Mutant::Meta::Example.add :send do
|
665
|
+
source 'shift'
|
666
|
+
|
667
|
+
singleton_mutations
|
668
|
+
mutation 'first'
|
669
|
+
end
|
670
|
+
|
671
|
+
Mutant::Meta::Example.add :send do
|
672
|
+
source 'first'
|
673
|
+
|
674
|
+
singleton_mutations
|
675
|
+
mutation 'last'
|
676
|
+
end
|
677
|
+
|
678
|
+
Mutant::Meta::Example.add :send do
|
679
|
+
source 'last'
|
680
|
+
|
681
|
+
singleton_mutations
|
682
|
+
mutation 'first'
|
683
|
+
end
|