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/block.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :block do
|
2
2
|
source 'foo { a; b }'
|
3
3
|
|
4
4
|
singleton_mutations
|
@@ -14,7 +14,7 @@ Mutant::Meta::Example.add do
|
|
14
14
|
mutation 'a; b'
|
15
15
|
end
|
16
16
|
|
17
|
-
Mutant::Meta::Example.add do
|
17
|
+
Mutant::Meta::Example.add :block do
|
18
18
|
source 'foo { |a, b| }'
|
19
19
|
|
20
20
|
singleton_mutations
|
@@ -27,7 +27,7 @@ Mutant::Meta::Example.add do
|
|
27
27
|
mutation 'foo { || }'
|
28
28
|
end
|
29
29
|
|
30
|
-
Mutant::Meta::Example.add do
|
30
|
+
Mutant::Meta::Example.add :block do
|
31
31
|
source 'foo { |(a, b), c| }'
|
32
32
|
|
33
33
|
singleton_mutations
|
@@ -44,7 +44,7 @@ Mutant::Meta::Example.add do
|
|
44
44
|
mutation 'foo'
|
45
45
|
end
|
46
46
|
|
47
|
-
Mutant::Meta::Example.add do
|
47
|
+
Mutant::Meta::Example.add :block do
|
48
48
|
source 'foo(a, b) {}'
|
49
49
|
|
50
50
|
singleton_mutations
|
@@ -59,7 +59,7 @@ Mutant::Meta::Example.add do
|
|
59
59
|
mutation 'foo {}'
|
60
60
|
end
|
61
61
|
|
62
|
-
Mutant::Meta::Example.add do
|
62
|
+
Mutant::Meta::Example.add :block do
|
63
63
|
source 'foo { |(a)| }'
|
64
64
|
|
65
65
|
singleton_mutations
|
@@ -70,7 +70,7 @@ Mutant::Meta::Example.add do
|
|
70
70
|
mutation 'foo'
|
71
71
|
end
|
72
72
|
|
73
|
-
Mutant::Meta::Example.add do
|
73
|
+
Mutant::Meta::Example.add :block do
|
74
74
|
source 'foo { bar(nil) }'
|
75
75
|
|
76
76
|
singleton_mutations
|
@@ -84,7 +84,7 @@ Mutant::Meta::Example.add do
|
|
84
84
|
mutation 'bar(nil)'
|
85
85
|
end
|
86
86
|
|
87
|
-
Mutant::Meta::Example.add do
|
87
|
+
Mutant::Meta::Example.add :block do
|
88
88
|
source 'foo { self << true }'
|
89
89
|
|
90
90
|
singleton_mutations
|
data/meta/block_pass.rb
CHANGED
data/meta/blockarg.rb
CHANGED
data/meta/break.rb
CHANGED
data/meta/case.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :case do
|
2
2
|
source <<-RUBY
|
3
3
|
case
|
4
4
|
when true
|
@@ -29,7 +29,7 @@ Mutant::Meta::Example.add do
|
|
29
29
|
RUBY
|
30
30
|
end
|
31
31
|
|
32
|
-
Mutant::Meta::Example.add do
|
32
|
+
Mutant::Meta::Example.add :case do
|
33
33
|
source <<-RUBY
|
34
34
|
case condition
|
35
35
|
when A
|
data/meta/casgn.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :casgn do
|
2
2
|
source 'A = true'
|
3
3
|
|
4
4
|
mutation 'A__MUTANT__ = true'
|
@@ -7,7 +7,7 @@ Mutant::Meta::Example.add do
|
|
7
7
|
mutation 'remove_const :A'
|
8
8
|
end
|
9
9
|
|
10
|
-
Mutant::Meta::Example.add do
|
10
|
+
Mutant::Meta::Example.add :casgn do
|
11
11
|
source 'self::A = true'
|
12
12
|
|
13
13
|
mutation 'self::A__MUTANT__ = true'
|
@@ -15,3 +15,12 @@ Mutant::Meta::Example.add do
|
|
15
15
|
mutation 'self::A = nil'
|
16
16
|
mutation 'self.remove_const :A'
|
17
17
|
end
|
18
|
+
|
19
|
+
Mutant::Meta::Example.add :casgn do
|
20
|
+
source 'A &&= true'
|
21
|
+
|
22
|
+
singleton_mutations
|
23
|
+
mutation 'A__MUTANT__ &&= true'
|
24
|
+
mutation 'A &&= false'
|
25
|
+
mutation 'A &&= nil'
|
26
|
+
end
|
data/meta/cbase.rb
CHANGED
data/meta/class.rb
ADDED
data/meta/const.rb
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :const do
|
2
2
|
source 'A::B::C'
|
3
3
|
|
4
4
|
singleton_mutations
|
5
5
|
mutation 'B::C'
|
6
6
|
mutation 'C'
|
7
7
|
end
|
8
|
+
|
9
|
+
Mutant::Meta::Example.add :const do
|
10
|
+
source 'A.foo'
|
11
|
+
|
12
|
+
singleton_mutations
|
13
|
+
mutation 'A'
|
14
|
+
mutation 'self.foo'
|
15
|
+
end
|
data/meta/csend.rb
ADDED
data/meta/cvar.rb
CHANGED
data/meta/cvasgn.rb
CHANGED
data/meta/date.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :send do
|
2
2
|
source 'Date.parse(nil)'
|
3
3
|
|
4
4
|
singleton_mutations
|
@@ -17,7 +17,7 @@ Mutant::Meta::Example.add do
|
|
17
17
|
mutation 'Date.jisx0301(nil)'
|
18
18
|
end
|
19
19
|
|
20
|
-
Mutant::Meta::Example.add do
|
20
|
+
Mutant::Meta::Example.add :send do
|
21
21
|
source '::Date.parse(nil)'
|
22
22
|
|
23
23
|
singleton_mutations
|
@@ -37,7 +37,7 @@ Mutant::Meta::Example.add do
|
|
37
37
|
mutation '::Date.jisx0301(nil)'
|
38
38
|
end
|
39
39
|
|
40
|
-
Mutant::Meta::Example.add do
|
40
|
+
Mutant::Meta::Example.add :send do
|
41
41
|
source 'Date.iso8601(nil)'
|
42
42
|
|
43
43
|
singleton_mutations
|
@@ -46,7 +46,7 @@ Mutant::Meta::Example.add do
|
|
46
46
|
mutation 'Date'
|
47
47
|
end
|
48
48
|
|
49
|
-
Mutant::Meta::Example.add do
|
49
|
+
Mutant::Meta::Example.add :send do
|
50
50
|
source 'Foo::Date.parse(nil)'
|
51
51
|
|
52
52
|
singleton_mutations
|
data/meta/def.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :def do
|
2
2
|
source 'def foo; end'
|
3
3
|
|
4
4
|
mutation 'def foo; raise; end'
|
5
5
|
mutation 'remove_method :foo'
|
6
6
|
end
|
7
7
|
|
8
|
-
Mutant::Meta::Example.add do
|
8
|
+
Mutant::Meta::Example.add :def do
|
9
9
|
source 'def foo(a, *b); nil; end'
|
10
10
|
|
11
11
|
mutation 'def foo(_a, *b); nil; end'
|
@@ -18,7 +18,7 @@ Mutant::Meta::Example.add do
|
|
18
18
|
mutation 'remove_method :foo'
|
19
19
|
end
|
20
20
|
|
21
|
-
Mutant::Meta::Example.add do
|
21
|
+
Mutant::Meta::Example.add :def do
|
22
22
|
source 'def foo(a, *); nil; end'
|
23
23
|
|
24
24
|
mutation 'def foo(_a, *); nil; end'
|
@@ -30,7 +30,7 @@ Mutant::Meta::Example.add do
|
|
30
30
|
mutation 'remove_method :foo'
|
31
31
|
end
|
32
32
|
|
33
|
-
Mutant::Meta::Example.add do
|
33
|
+
Mutant::Meta::Example.add :def do
|
34
34
|
source 'def foo; foo; rescue; end'
|
35
35
|
|
36
36
|
mutation 'def foo; raise; end'
|
@@ -43,7 +43,7 @@ Mutant::Meta::Example.add do
|
|
43
43
|
mutation 'def foo; foo; end'
|
44
44
|
end
|
45
45
|
|
46
|
-
Mutant::Meta::Example.add do
|
46
|
+
Mutant::Meta::Example.add :def do
|
47
47
|
source 'def a; foo; rescue; bar; else; baz; end'
|
48
48
|
|
49
49
|
# Mutate all bodies
|
@@ -72,7 +72,7 @@ Mutant::Meta::Example.add do
|
|
72
72
|
mutation 'remove_method :a'
|
73
73
|
end
|
74
74
|
|
75
|
-
Mutant::Meta::Example.add do
|
75
|
+
Mutant::Meta::Example.add :def do
|
76
76
|
source 'def foo; true; false; end'
|
77
77
|
|
78
78
|
# Mutation of each statement in block
|
@@ -93,7 +93,7 @@ Mutant::Meta::Example.add do
|
|
93
93
|
mutation 'remove_method :foo'
|
94
94
|
end
|
95
95
|
|
96
|
-
Mutant::Meta::Example.add do
|
96
|
+
Mutant::Meta::Example.add :def do
|
97
97
|
source 'def foo(a, b); end'
|
98
98
|
|
99
99
|
# Deletion of each argument
|
@@ -113,7 +113,7 @@ Mutant::Meta::Example.add do
|
|
113
113
|
mutation 'remove_method :foo'
|
114
114
|
end
|
115
115
|
|
116
|
-
Mutant::Meta::Example.add do
|
116
|
+
Mutant::Meta::Example.add :def do
|
117
117
|
source 'def foo(a, b = nil); true; end'
|
118
118
|
|
119
119
|
mutation 'def foo(_a, b = nil); true; end'
|
@@ -130,7 +130,7 @@ Mutant::Meta::Example.add do
|
|
130
130
|
mutation 'remove_method :foo'
|
131
131
|
end
|
132
132
|
|
133
|
-
Mutant::Meta::Example.add do
|
133
|
+
Mutant::Meta::Example.add :def do
|
134
134
|
source 'def foo(_unused); end'
|
135
135
|
|
136
136
|
mutation 'def foo(_unused); raise; end'
|
@@ -138,7 +138,7 @@ Mutant::Meta::Example.add do
|
|
138
138
|
mutation 'remove_method :foo'
|
139
139
|
end
|
140
140
|
|
141
|
-
Mutant::Meta::Example.add do
|
141
|
+
Mutant::Meta::Example.add :def do
|
142
142
|
source 'def foo(_unused = true); end'
|
143
143
|
|
144
144
|
mutation 'def foo(_unused = nil); end'
|
@@ -149,7 +149,7 @@ Mutant::Meta::Example.add do
|
|
149
149
|
mutation 'remove_method :foo'
|
150
150
|
end
|
151
151
|
|
152
|
-
Mutant::Meta::Example.add do
|
152
|
+
Mutant::Meta::Example.add :def do
|
153
153
|
source 'def foo(a = 0, b = 0); end'
|
154
154
|
mutation 'def foo(a = 0, _b = 0); end'
|
155
155
|
mutation 'def foo(_a = 0, b = 0); end'
|
@@ -171,7 +171,7 @@ Mutant::Meta::Example.add do
|
|
171
171
|
mutation 'remove_method :foo'
|
172
172
|
end
|
173
173
|
|
174
|
-
Mutant::Meta::Example.add do
|
174
|
+
Mutant::Meta::Example.add :def do
|
175
175
|
source 'def foo(a = true); end'
|
176
176
|
|
177
177
|
mutation 'def foo(a); end'
|
@@ -184,7 +184,7 @@ Mutant::Meta::Example.add do
|
|
184
184
|
mutation 'remove_method :foo'
|
185
185
|
end
|
186
186
|
|
187
|
-
Mutant::Meta::Example.add do
|
187
|
+
Mutant::Meta::Example.add :def do
|
188
188
|
source 'def self.foo; true; false; end'
|
189
189
|
|
190
190
|
# Body presence mutation
|
@@ -203,7 +203,7 @@ Mutant::Meta::Example.add do
|
|
203
203
|
mutation 'def self.foo; raise; end'
|
204
204
|
end
|
205
205
|
|
206
|
-
Mutant::Meta::Example.add do
|
206
|
+
Mutant::Meta::Example.add :def do
|
207
207
|
|
208
208
|
source 'def self.foo(a, b); end'
|
209
209
|
|
data/meta/defined.rb
CHANGED
data/meta/dstr.rb
CHANGED
data/meta/dsym.rb
CHANGED
data/meta/ensure.rb
CHANGED
data/meta/false.rb
CHANGED
data/meta/float.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :float do
|
2
2
|
source '10.0'
|
3
3
|
|
4
4
|
singleton_mutations
|
@@ -14,7 +14,7 @@ Mutant::Meta::Example.add do
|
|
14
14
|
mutation '-10.0'
|
15
15
|
end
|
16
16
|
|
17
|
-
Mutant::Meta::Example.add do
|
17
|
+
Mutant::Meta::Example.add :float do
|
18
18
|
source '0.0'
|
19
19
|
|
20
20
|
singleton_mutations
|
@@ -24,7 +24,7 @@ Mutant::Meta::Example.add do
|
|
24
24
|
mutation '(-1.0 / 0.0)'
|
25
25
|
end
|
26
26
|
|
27
|
-
Mutant::Meta::Example.add do
|
27
|
+
Mutant::Meta::Example.add :float do
|
28
28
|
source '-0.0'
|
29
29
|
|
30
30
|
singleton_mutations
|
data/meta/gvar.rb
CHANGED
data/meta/gvasgn.rb
CHANGED
data/meta/hash.rb
CHANGED
data/meta/if.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Mutant::Meta::Example.add do
|
1
|
+
Mutant::Meta::Example.add :if do
|
2
2
|
source 'if condition; true; else false; end'
|
3
3
|
|
4
4
|
singleton_mutations
|
@@ -33,7 +33,7 @@ Mutant::Meta::Example.add do
|
|
33
33
|
mutation 'if condition; true; else nil; end'
|
34
34
|
end
|
35
35
|
|
36
|
-
Mutant::Meta::Example.add do
|
36
|
+
Mutant::Meta::Example.add :if do
|
37
37
|
source 'if condition; true; end'
|
38
38
|
|
39
39
|
singleton_mutations
|
@@ -46,7 +46,7 @@ Mutant::Meta::Example.add do
|
|
46
46
|
mutation 'true'
|
47
47
|
end
|
48
48
|
|
49
|
-
Mutant::Meta::Example.add do
|
49
|
+
Mutant::Meta::Example.add :if do
|
50
50
|
source 'unless condition; true; end'
|
51
51
|
|
52
52
|
singleton_mutations
|
@@ -59,3 +59,17 @@ Mutant::Meta::Example.add do
|
|
59
59
|
mutation 'if condition; true; end'
|
60
60
|
mutation 'true'
|
61
61
|
end
|
62
|
+
|
63
|
+
Mutant::Meta::Example.add :if do
|
64
|
+
source 'true if /foo/'
|
65
|
+
|
66
|
+
singleton_mutations
|
67
|
+
mutation 'false if /foo/'
|
68
|
+
mutation 'true if //'
|
69
|
+
mutation 'nil if /foo/'
|
70
|
+
mutation 'true if true'
|
71
|
+
mutation 'true if false'
|
72
|
+
mutation 'true if nil'
|
73
|
+
mutation 'true if /nomatch\A/'
|
74
|
+
mutation 'true'
|
75
|
+
end
|