mutest 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/hooks/pre-command +1 -1
  3. data/.buildkite/pipeline.yml +9 -22
  4. data/.gitmodules +3 -0
  5. data/CHANGELOG.md +14 -1
  6. data/Gemfile +11 -6
  7. data/Gemfile.lock +27 -101
  8. data/README.md +42 -2
  9. data/Rakefile +2 -8
  10. data/circle.yml +4 -1
  11. data/lib/mutest.rb +1 -1
  12. data/lib/mutest/ast/meta/send.rb +6 -0
  13. data/lib/mutest/ast/named_children.rb +1 -1
  14. data/lib/mutest/ast/nodes.rb +0 -2
  15. data/lib/mutest/ast/regexp.rb +4 -4
  16. data/lib/mutest/ast/regexp/transformer.rb +4 -4
  17. data/lib/mutest/ast/regexp/transformer/character_set.rb +1 -1
  18. data/lib/mutest/ast/regexp/transformer/direct.rb +1 -1
  19. data/lib/mutest/ast/regexp/transformer/quantifier.rb +3 -3
  20. data/lib/mutest/ast/regexp/transformer/recursive.rb +1 -1
  21. data/lib/mutest/ast/regexp/transformer/text.rb +1 -1
  22. data/lib/mutest/ast/types.rb +0 -1
  23. data/lib/mutest/cli.rb +1 -1
  24. data/lib/mutest/context.rb +1 -1
  25. data/lib/mutest/matcher/config.rb +0 -2
  26. data/lib/mutest/matcher/method.rb +1 -3
  27. data/lib/mutest/matcher/method/instance.rb +1 -1
  28. data/lib/mutest/matcher/methods.rb +1 -1
  29. data/lib/mutest/mutator.rb +0 -2
  30. data/lib/mutest/mutator/node/block_pass.rb +29 -0
  31. data/lib/mutest/mutator/node/generic.rb +1 -0
  32. data/lib/mutest/mutator/node/literal/boolean.rb +0 -1
  33. data/lib/mutest/mutator/node/literal/range.rb +1 -1
  34. data/lib/mutest/mutator/node/literal/regex.rb +1 -1
  35. data/lib/mutest/mutator/node/literal/string.rb +3 -0
  36. data/lib/mutest/mutator/node/literal/symbol.rb +0 -2
  37. data/lib/mutest/mutator/node/send.rb +35 -6
  38. data/lib/mutest/mutator/node/splat.rb +3 -1
  39. data/lib/mutest/parallel/worker.rb +1 -1
  40. data/lib/mutest/reporter/cli.rb +0 -2
  41. data/lib/mutest/reporter/cli/format.rb +1 -1
  42. data/lib/mutest/reporter/cli/printer.rb +2 -2
  43. data/lib/mutest/reporter/cli/printer/mutation_result.rb +0 -2
  44. data/lib/mutest/version.rb +1 -1
  45. data/meta/and.rb +0 -2
  46. data/meta/array.rb +0 -3
  47. data/meta/begin.rb +0 -3
  48. data/meta/block.rb +0 -1
  49. data/meta/block_pass.rb +30 -1
  50. data/meta/break.rb +0 -1
  51. data/meta/case.rb +0 -6
  52. data/meta/casgn.rb +0 -3
  53. data/meta/cvasgn.rb +0 -1
  54. data/meta/def.rb +0 -7
  55. data/meta/dstr.rb +2 -0
  56. data/meta/dsym.rb +2 -0
  57. data/meta/ensure.rb +0 -1
  58. data/meta/false.rb +0 -1
  59. data/meta/gvasgn.rb +0 -1
  60. data/meta/hash.rb +0 -4
  61. data/meta/if.rb +0 -5
  62. data/meta/ivasgn.rb +0 -1
  63. data/meta/kwbegin.rb +0 -1
  64. data/meta/lvasgn.rb +0 -1
  65. data/meta/match_current_line.rb +0 -1
  66. data/meta/next.rb +0 -1
  67. data/meta/or.rb +0 -2
  68. data/meta/regexp.rb +0 -1
  69. data/meta/rescue.rb +0 -6
  70. data/meta/send.rb +60 -16
  71. data/meta/splat.rb +25 -0
  72. data/meta/str.rb +1 -0
  73. data/meta/true.rb +0 -1
  74. data/meta/until.rb +0 -1
  75. data/meta/while.rb +0 -2
  76. data/meta/yield.rb +0 -1
  77. data/mutest-rspec.gemspec +1 -1
  78. data/mutest.gemspec +0 -4
  79. data/spec/integration/mutest/rspec_spec.rb +1 -1
  80. data/spec/integrations.yml +1 -1
  81. data/spec/shared/command_method_behavior.rb +5 -0
  82. data/spec/shared/idempotent_method_behavior.rb +10 -0
  83. data/spec/spec_helper.rb +21 -1
  84. data/spec/support/xspec.rb +1 -1
  85. data/spec/unit/mutest/actor/sender_spec.rb +1 -1
  86. data/spec/unit/mutest/ast/meta/send_spec.rb +23 -11
  87. data/spec/unit/mutest/cli_spec.rb +13 -13
  88. data/spec/unit/mutest/context_spec.rb +2 -2
  89. data/spec/unit/mutest/diff_spec.rb +9 -9
  90. data/spec/unit/mutest/integration/null_spec.rb +1 -1
  91. data/spec/unit/mutest/integration_spec.rb +1 -1
  92. data/spec/unit/mutest/matcher/method/instance_spec.rb +5 -5
  93. data/spec/unit/mutest/matcher/method/singleton_spec.rb +5 -5
  94. data/spec/unit/mutest/meta/example_spec.rb +3 -3
  95. data/spec/unit/mutest/mutation_spec.rb +5 -5
  96. data/spec/unit/mutest/mutator/node_spec.rb +6 -9
  97. data/spec/unit/mutest/parallel/driver_spec.rb +1 -1
  98. data/spec/unit/mutest/reporter/null_spec.rb +1 -1
  99. data/spec/unit/mutest/reporter/sequence_spec.rb +1 -1
  100. data/spec/unit/mutest/result_spec.rb +1 -1
  101. data/spec/unit/mutest/runner/sink_spec.rb +1 -1
  102. data/spec/unit/mutest/subject/method/instance/memoized_spec.rb +1 -1
  103. data/spec/unit/mutest/subject/method/instance_spec.rb +3 -3
  104. data/spec/unit/mutest/subject/method/singleton_spec.rb +3 -3
  105. data/spec/unit/mutest/subject_spec.rb +2 -2
  106. data/test_app/Gemfile.rspec3.6 +7 -0
  107. metadata +9 -57
  108. data/build/Dockerfile +0 -71
  109. data/build/docker-bootstrap.sh +0 -85
  110. data/build/docker-exec +0 -29
  111. data/build/make-docker +0 -3
  112. data/build/ruby_matrix +0 -1
  113. data/build/run +0 -5
  114. data/build/strict-mode.sh +0 -16
  115. data/config/devtools.yml +0 -2
  116. data/config/flay.yml +0 -3
  117. data/config/flog.yml +0 -2
  118. data/config/reek.yml +0 -137
  119. data/lib/mutest/mutator/node/noop.rb +0 -19
@@ -48,7 +48,7 @@ module Mutest
48
48
 
49
49
  # Format object with printer
50
50
  #
51
- # @param [Class:Printer] printer
51
+ # @param [Class] Printer
52
52
  # @param [Object] object
53
53
  #
54
54
  # @return [String]
@@ -51,7 +51,7 @@ module Mutest
51
51
 
52
52
  # Visit a collection of objects
53
53
  #
54
- # @return [Class::Printer] printer
54
+ # @return [Class] Printer
55
55
  # @return [Enumerable<Object>] collection
56
56
  #
57
57
  # @return [undefined]
@@ -63,7 +63,7 @@ module Mutest
63
63
 
64
64
  # Visit object
65
65
  #
66
- # @param [Class::Printer] printer
66
+ # @param [Class] Printer
67
67
  # @param [Object] object
68
68
  #
69
69
  # @return [undefined]
@@ -3,8 +3,6 @@ module Mutest
3
3
  class CLI
4
4
  class Printer
5
5
  # Reporter for mutation results
6
- #
7
- # :reek:TooManyConstants
8
6
  class MutationResult < self
9
7
  delegate :mutation, :test_result
10
8
 
@@ -1,4 +1,4 @@
1
1
  module Mutest
2
2
  # Current mutest version
3
- VERSION = '0.0.6'.freeze
3
+ VERSION = '0.0.7'.freeze
4
4
  end # Mutest
@@ -5,8 +5,6 @@ Mutest::Meta::Example.add :and do
5
5
  mutation 'true'
6
6
  mutation 'false'
7
7
  mutation 'true or false'
8
- mutation 'true and nil'
9
- mutation 'nil and false'
10
8
  mutation 'false and false'
11
9
  mutation 'true and true'
12
10
  mutation '!true and false'
@@ -4,7 +4,6 @@ Mutest::Meta::Example.add :array do
4
4
  singleton_mutations
5
5
  mutation 'true'
6
6
  mutation '[false]'
7
- mutation '[nil]'
8
7
  mutation '[]'
9
8
  end
10
9
 
@@ -14,9 +13,7 @@ Mutest::Meta::Example.add :array do
14
13
  singleton_mutations
15
14
 
16
15
  # Mutation of each element in array
17
- mutation '[nil, false]'
18
16
  mutation '[false, false]'
19
- mutation '[true, nil]'
20
17
  mutation '[true, true]'
21
18
 
22
19
  # Remove each element of array once
@@ -3,8 +3,6 @@ Mutest::Meta::Example.add :begin do
3
3
  # Mutation of each statement in block
4
4
  mutation 'true; true'
5
5
  mutation 'false; false'
6
- mutation 'nil; false'
7
- mutation 'true; nil'
8
6
 
9
7
  # Delete each statement
10
8
  mutation 'true'
@@ -14,6 +12,5 @@ end
14
12
  Mutest::Meta::Example.add :begin do
15
13
  source s(:begin, s(:true))
16
14
  # Mutation of each statement in block
17
- mutation s(:begin, s(:nil))
18
15
  mutation s(:begin, s(:false))
19
16
  end
@@ -91,7 +91,6 @@ Mutest::Meta::Example.add :block do
91
91
 
92
92
  singleton_mutations
93
93
  mutation 'foo { self << false }'
94
- mutation 'foo { self << nil }'
95
94
  mutation 'foo { nil << true }'
96
95
  mutation 'foo { nil }'
97
96
  mutation 'foo { self }'
@@ -1,6 +1,35 @@
1
1
  Mutest::Meta::Example.add :block_pass do
2
- source 'foo(&bar)'
2
+ source 'foo(&method(:bar))'
3
3
 
4
4
  singleton_mutations
5
5
  mutation 'foo'
6
+ mutation 'foo(&nil)'
7
+ mutation 'foo(&self)'
8
+ mutation 'foo(&method)'
9
+ mutation 'foo(&method(nil))'
10
+ mutation 'foo(&method(self))'
11
+ mutation 'foo(&method(:bar__mutest__))'
12
+ mutation 'foo(&public_method(:bar))'
13
+ mutation 'foo(&:bar)'
14
+ end
15
+
16
+ Mutest::Meta::Example.add :block_pass do
17
+ source 'foo(&:to_s)'
18
+
19
+ singleton_mutations
20
+ mutation 'foo'
21
+ mutation 'foo(&nil)'
22
+ mutation 'foo(&self)'
23
+ mutation 'foo(&:to_s__mutest__)'
24
+ mutation 'foo(&:to_str)'
25
+ end
26
+
27
+ Mutest::Meta::Example.add :block_pass do
28
+ source 'foo(&:bar)'
29
+
30
+ singleton_mutations
31
+ mutation 'foo'
32
+ mutation 'foo(&nil)'
33
+ mutation 'foo(&self)'
34
+ mutation 'foo(&:bar__mutest__)'
6
35
  end
@@ -3,6 +3,5 @@ Mutest::Meta::Example.add :break do
3
3
 
4
4
  singleton_mutations
5
5
  mutation 'break false'
6
- mutation 'break nil'
7
6
  mutation 'break'
8
7
  end
@@ -21,12 +21,6 @@ Mutest::Meta::Example.add :case do
21
21
  else
22
22
  end
23
23
  RUBY
24
- mutation <<-RUBY
25
- case
26
- when nil
27
- else
28
- end
29
- RUBY
30
24
  end
31
25
 
32
26
  # rubocop:disable Metrics/BlockLength
@@ -3,7 +3,6 @@ Mutest::Meta::Example.add :casgn do
3
3
 
4
4
  mutation 'A__MUTEST__ = true'
5
5
  mutation 'A = false'
6
- mutation 'A = nil'
7
6
  mutation 'remove_const :A'
8
7
  end
9
8
 
@@ -12,7 +11,6 @@ Mutest::Meta::Example.add :casgn do
12
11
 
13
12
  mutation 'self::A__MUTEST__ = true'
14
13
  mutation 'self::A = false'
15
- mutation 'self::A = nil'
16
14
  mutation 'self.remove_const :A'
17
15
  end
18
16
 
@@ -22,5 +20,4 @@ Mutest::Meta::Example.add :casgn do
22
20
  singleton_mutations
23
21
  mutation 'A__MUTEST__ &&= true'
24
22
  mutation 'A &&= false'
25
- mutation 'A &&= nil'
26
23
  end
@@ -4,5 +4,4 @@ Mutest::Meta::Example.add :cvasgn do
4
4
  singleton_mutations
5
5
  mutation '@@a__mutest__ = true'
6
6
  mutation '@@a = false'
7
- mutation '@@a = nil'
8
7
  end
@@ -114,8 +114,6 @@ Mutest::Meta::Example.add :def do
114
114
  # Mutation of each statement in block
115
115
  mutation 'def foo; true; true; end'
116
116
  mutation 'def foo; false; false; end'
117
- mutation 'def foo; true; nil; end'
118
- mutation 'def foo; nil; false; end'
119
117
 
120
118
  # Remove statement in block
121
119
  mutation 'def foo; true; end'
@@ -161,7 +159,6 @@ Mutest::Meta::Example.add :def do
161
159
  mutation 'def foo(a, b = nil); end'
162
160
  mutation 'def foo; true; end'
163
161
  mutation 'def foo(a, b = nil); raise; end'
164
- mutation 'def foo(a, b = nil); nil; end'
165
162
  mutation 'def foo(a, b = nil); false; end'
166
163
  mutation 'def foo(a); true; end'
167
164
  mutation 'def foo(a, b = nil); b = nil; true; end'
@@ -182,7 +179,6 @@ end
182
179
  Mutest::Meta::Example.add :def do
183
180
  source 'def foo(_unused = true); end'
184
181
 
185
- mutation 'def foo(_unused = nil); end'
186
182
  mutation 'def foo(_unused = false); end'
187
183
  mutation 'def foo(_unused = true); raise; end'
188
184
  mutation 'def foo(_unused = true); super; end'
@@ -218,7 +214,6 @@ Mutest::Meta::Example.add :def do
218
214
  mutation 'def foo(a); end'
219
215
  mutation 'def foo(); end'
220
216
  mutation 'def foo(a = false); end'
221
- mutation 'def foo(a = nil); end'
222
217
  mutation 'def foo(_a = true); end'
223
218
  mutation 'def foo(a = true); raise; end'
224
219
  mutation 'def foo(a = true); super; end'
@@ -231,8 +226,6 @@ Mutest::Meta::Example.add :def do
231
226
  # Body presence mutation
232
227
  mutation 'def self.foo; false; false; end'
233
228
  mutation 'def self.foo; true; true; end'
234
- mutation 'def self.foo; true; nil; end'
235
- mutation 'def self.foo; nil; false; end'
236
229
 
237
230
  # Body presence mutation
238
231
  mutation 'def self.foo; true; end'
@@ -8,4 +8,6 @@ Mutest::Meta::Example.add :dstr do
8
8
  mutation '"foo#{bar}#{self}"'
9
9
  mutation '"foo#{nil}baz"'
10
10
  mutation '"foo#{self}baz"'
11
+ mutation '"foo__mutest__#{bar}baz"'
12
+ mutation '"foo#{bar}baz__mutest__"'
11
13
  end
@@ -9,4 +9,6 @@ Mutest::Meta::Example.add :dsym do
9
9
  mutation ':"#{"foo"}#{self}#{"baz"}"'
10
10
  mutation ':"#{"foo"}#{bar}#{nil}"'
11
11
  mutation ':"#{"foo"}#{bar}#{self}"'
12
+ mutation ':"foo__mutest__#{bar}baz"'
13
+ mutation ':"foo#{bar}baz__mutest__"'
12
14
  end
@@ -3,5 +3,4 @@ Mutest::Meta::Example.add :ensure do
3
3
 
4
4
  singleton_mutations
5
5
  mutation 'begin; rescue; ensure; false; end'
6
- mutation 'begin; rescue; ensure; nil; end'
7
6
  end
@@ -1,6 +1,5 @@
1
1
  Mutest::Meta::Example.add :false do
2
2
  source 'false'
3
3
 
4
- mutation 'nil'
5
4
  mutation 'true'
6
5
  end
@@ -4,5 +4,4 @@ Mutest::Meta::Example.add :gvasgn do
4
4
  singleton_mutations
5
5
  mutation '$a__mutest__ = true'
6
6
  mutation '$a = false'
7
- mutation '$a = nil'
8
7
  end
@@ -5,13 +5,9 @@ Mutest::Meta::Example.add :hash do
5
5
 
6
6
  # Mutation of each key and value in hash
7
7
  mutation '{ false => true , false => false }'
8
- mutation '{ nil => true , false => false }'
9
8
  mutation '{ true => false , false => false }'
10
- mutation '{ true => nil , false => false }'
11
9
  mutation '{ true => true , true => false }'
12
- mutation '{ true => true , nil => false }'
13
10
  mutation '{ true => true , false => true }'
14
- mutation '{ true => true , false => nil }'
15
11
 
16
12
  # Remove each key once
17
13
  mutation '{ true => true }'
data/meta/if.rb CHANGED
@@ -26,11 +26,9 @@ Mutest::Meta::Example.add :if do
26
26
 
27
27
  # mutation of if body
28
28
  mutation 'if condition; false; else false; end'
29
- mutation 'if condition; nil; else false; end'
30
29
 
31
30
  # mutation of else body
32
31
  mutation 'if condition; true; else true; end'
33
- mutation 'if condition; true; else nil; end'
34
32
  end
35
33
 
36
34
  Mutest::Meta::Example.add :if do
@@ -39,7 +37,6 @@ Mutest::Meta::Example.add :if do
39
37
  singleton_mutations
40
38
  mutation 'if !condition; true; end'
41
39
  mutation 'if condition; false; end'
42
- mutation 'if condition; nil; end'
43
40
  mutation 'if true; true; end'
44
41
  mutation 'if false; true; end'
45
42
  mutation 'if nil; true; end'
@@ -55,7 +52,6 @@ Mutest::Meta::Example.add :if do
55
52
  mutation 'unless true; true; end'
56
53
  mutation 'unless false; true; end'
57
54
  mutation 'unless condition; false; end'
58
- mutation 'unless condition; nil; end'
59
55
  mutation 'if condition; true; end'
60
56
  mutation 'true'
61
57
  end
@@ -66,7 +62,6 @@ Mutest::Meta::Example.add :if do
66
62
  singleton_mutations
67
63
  mutation 'false if /foo/'
68
64
  mutation 'true if //'
69
- mutation 'nil if /foo/'
70
65
  mutation 'true if true'
71
66
  mutation 'true if false'
72
67
  mutation 'true if nil'
@@ -4,7 +4,6 @@ Mutest::Meta::Example.add :ivasgn do
4
4
  singleton_mutations
5
5
  mutation '@a__mutest__ = true'
6
6
  mutation '@a = false'
7
- mutation '@a = nil'
8
7
  end
9
8
 
10
9
  Mutest::Meta::Example.add :ivasgn do
@@ -3,5 +3,4 @@ Mutest::Meta::Example.add :kwbegin do
3
3
 
4
4
  singleton_mutations
5
5
  mutation 'begin; false; end'
6
- mutation 'begin; nil; end'
7
6
  end
@@ -4,5 +4,4 @@ Mutest::Meta::Example.add :lvasgn do
4
4
  singleton_mutations
5
5
  mutation 'a__mutest__ = true'
6
6
  mutation 'a = false'
7
- mutation 'a = nil'
8
7
  end
@@ -4,7 +4,6 @@ Mutest::Meta::Example.add :match_current_line do
4
4
  singleton_mutations
5
5
  mutation 'false if /foo/'
6
6
  mutation 'true if //'
7
- mutation 'nil if /foo/'
8
7
  mutation 'true if true'
9
8
  mutation 'true if false'
10
9
  mutation 'true if nil'
@@ -3,7 +3,6 @@ Mutest::Meta::Example.add :next do
3
3
 
4
4
  singleton_mutations
5
5
  mutation 'next false'
6
- mutation 'next nil'
7
6
  mutation 'next'
8
7
  mutation 'break true'
9
8
  end
data/meta/or.rb CHANGED
@@ -4,9 +4,7 @@ Mutest::Meta::Example.add :or do
4
4
  singleton_mutations
5
5
  mutation 'true'
6
6
  mutation 'false'
7
- mutation 'nil or false'
8
7
  mutation 'false or false'
9
- mutation 'true or nil'
10
8
  mutation 'true or true'
11
9
  mutation 'true and false'
12
10
  mutation '!true or false'
@@ -51,7 +51,6 @@ Mutest::Meta::Example.add :regexp do
51
51
 
52
52
  singleton_mutations
53
53
  mutation 'false if /foo/'
54
- mutation 'nil if /foo/'
55
54
  mutation 'true if true'
56
55
  mutation 'true if false'
57
56
  mutation 'true if nil'
@@ -6,7 +6,6 @@ Mutest::Meta::Example.add :rescue do
6
6
  mutation 'begin; rescue self, ExceptionB => error; true; end'
7
7
  mutation 'begin; rescue ExceptionA, self => error; true; end'
8
8
  mutation 'begin; rescue ExceptionA, ExceptionB => error; false; end'
9
- mutation 'begin; rescue ExceptionA, ExceptionB => error; nil; end'
10
9
  mutation 'begin; true; end'
11
10
  end
12
11
 
@@ -16,7 +15,6 @@ Mutest::Meta::Example.add :rescue do
16
15
  singleton_mutations
17
16
  mutation 'begin; rescue SomeException; true; end'
18
17
  mutation 'begin; rescue SomeException => error; false; end'
19
- mutation 'begin; rescue SomeException => error; nil; end'
20
18
  mutation 'begin; rescue self => error; true; end'
21
19
  mutation 'begin; true; end'
22
20
  end
@@ -26,7 +24,6 @@ Mutest::Meta::Example.add :rescue do
26
24
 
27
25
  singleton_mutations
28
26
  mutation 'begin; rescue => error; false; end'
29
- mutation 'begin; rescue => error; nil; end'
30
27
  mutation 'begin; rescue; true; end'
31
28
  mutation 'begin; true; end'
32
29
  end
@@ -36,7 +33,6 @@ Mutest::Meta::Example.add :rescue do
36
33
 
37
34
  singleton_mutations
38
35
  mutation 'begin; rescue; false; end'
39
- mutation 'begin; rescue; nil; end'
40
36
  mutation 'begin; true end'
41
37
  end
42
38
 
@@ -45,7 +41,6 @@ Mutest::Meta::Example.add :rescue do
45
41
 
46
42
  singleton_mutations
47
43
  mutation 'begin; false; end'
48
- mutation 'begin; nil; end'
49
44
  end
50
45
 
51
46
  Mutest::Meta::Example.add :rescue do
@@ -83,5 +78,4 @@ Mutest::Meta::Example.add :rescue do
83
78
 
84
79
  singleton_mutations
85
80
  mutation 'begin; rescue; ensure; false; end'
86
- mutation 'begin; rescue; ensure; nil; end'
87
81
  end
@@ -39,7 +39,6 @@ Mutest::Meta::Example.add :send do
39
39
  mutation 'A.const_get(self, true)'
40
40
  mutation 'A.const_get(:B__mutest__, true)'
41
41
  mutation 'A.const_get(true)'
42
- mutation 'A.const_get(:B, nil)'
43
42
  mutation 'A.const_get(:B, false)'
44
43
  mutation 'A.const_get(:B)'
45
44
  end
@@ -387,23 +386,13 @@ Mutest::Meta::Example.add :send do
387
386
  mutation 'baz'
388
387
  end
389
388
 
390
- Mutest::Meta::Example.add :send do
391
- source 'foo(*bar)'
392
-
393
- singleton_mutations
394
- mutation 'foo'
395
- mutation 'foo(nil)'
396
- mutation 'foo(bar)'
397
- mutation 'foo(self)'
398
- mutation 'foo(*nil)'
399
- mutation 'foo(*self)'
400
- end
401
-
402
389
  Mutest::Meta::Example.add :send do
403
390
  source 'foo(&bar)'
404
391
 
405
392
  singleton_mutations
406
393
  mutation 'foo'
394
+ mutation 'foo(&nil)'
395
+ mutation 'foo(&self)'
407
396
  end
408
397
 
409
398
  Mutest::Meta::Example.add :send do
@@ -650,7 +639,6 @@ Mutest::Meta::Example.add :send do
650
639
  mutation 'foo[self]'
651
640
  mutation 'foo[bar]'
652
641
  mutation 'foo[*self]'
653
- mutation 'foo[*nil]'
654
642
  mutation 'self[*bar]'
655
643
  end
656
644
 
@@ -662,9 +650,7 @@ end
662
650
  mutation 'true'
663
651
  mutation 'false'
664
652
  mutation "false #{operator} false"
665
- mutation "nil #{operator} false"
666
653
  mutation "true #{operator} true"
667
- mutation "true #{operator} nil"
668
654
  end
669
655
  end
670
656
 
@@ -876,3 +862,61 @@ Mutest::Meta::Example.add :send do
876
862
  mutation 'foo.Array(nil)'
877
863
  mutation 'foo.Array(self)'
878
864
  end
865
+
866
+ Mutest::Meta::Example.add :send do
867
+ source 'foo.method(:to_s)'
868
+
869
+ singleton_mutations
870
+ mutation 'foo'
871
+ mutation 'foo.public_method(:to_s)'
872
+ mutation ':to_s'
873
+ mutation 'self.method(:to_s)'
874
+ mutation 'foo.method'
875
+ mutation 'foo.method(nil)'
876
+ mutation 'foo.method(self)'
877
+ mutation 'foo.method(:to_s__mutest__)'
878
+ mutation 'foo.method(:to_str)'
879
+ end
880
+
881
+ Mutest::Meta::Example.add :send do
882
+ source "foo.public_method('to_i')"
883
+
884
+ singleton_mutations
885
+ mutation 'foo'
886
+ mutation '"to_i"'
887
+ mutation 'self.public_method("to_i")'
888
+ mutation 'foo.public_method'
889
+ mutation 'foo.public_method(nil)'
890
+ mutation 'foo.public_method(self)'
891
+ mutation 'foo.public_method("to_int")'
892
+ mutation 'foo.public_method("to_i__mutest__")'
893
+ end
894
+
895
+ Mutest::Meta::Example.add :send do
896
+ source 'foo.method(bar, baz)'
897
+
898
+ singleton_mutations
899
+ mutation 'foo'
900
+ mutation 'foo.public_method(bar, baz)'
901
+ mutation 'self.method(bar, baz)'
902
+ mutation 'foo.method'
903
+ mutation 'foo.method(nil, baz)'
904
+ mutation 'foo.method(self, baz)'
905
+ mutation 'foo.method(baz)'
906
+ mutation 'foo.method(bar, nil)'
907
+ mutation 'foo.method(bar, self)'
908
+ mutation 'foo.method(bar)'
909
+ end
910
+
911
+ Mutest::Meta::Example.add :send do
912
+ source "foo.bar('to_s')"
913
+
914
+ singleton_mutations
915
+ mutation 'foo'
916
+ mutation '"to_s"'
917
+ mutation 'self.bar("to_s")'
918
+ mutation 'foo.bar("to_s__mutest__")'
919
+ mutation 'foo.bar'
920
+ mutation 'foo.bar(nil)'
921
+ mutation 'foo.bar(self)'
922
+ end