meta/send.rb in mutest-0.0.6 vs meta/send.rb in mutest-0.0.7
- old
+ new
@@ -37,11 +37,10 @@
mutation 'A.const_get'
mutation 'A.const_get(nil, true)'
mutation 'A.const_get(self, true)'
mutation 'A.const_get(:B__mutest__, true)'
mutation 'A.const_get(true)'
- mutation 'A.const_get(:B, nil)'
mutation 'A.const_get(:B, false)'
mutation 'A.const_get(:B)'
end
Mutest::Meta::Example.add :send do
@@ -386,26 +385,16 @@
mutation 'foo[] = baz'
mutation 'baz'
end
Mutest::Meta::Example.add :send do
- source 'foo(*bar)'
-
- singleton_mutations
- mutation 'foo'
- mutation 'foo(nil)'
- mutation 'foo(bar)'
- mutation 'foo(self)'
- mutation 'foo(*nil)'
- mutation 'foo(*self)'
-end
-
-Mutest::Meta::Example.add :send do
source 'foo(&bar)'
singleton_mutations
mutation 'foo'
+ mutation 'foo(&nil)'
+ mutation 'foo(&self)'
end
Mutest::Meta::Example.add :send do
source 'foo'
@@ -648,11 +637,10 @@
mutation 'foo.key?(*bar)'
mutation 'foo[nil]'
mutation 'foo[self]'
mutation 'foo[bar]'
mutation 'foo[*self]'
- mutation 'foo[*nil]'
mutation 'self[*bar]'
end
(Mutest::AST::Types::BINARY_METHOD_OPERATORS - %i[=~ <= >= < > == != eql? ===]).each do |operator|
Mutest::Meta::Example.add :send do
@@ -660,13 +648,11 @@
singleton_mutations
mutation 'true'
mutation 'false'
mutation "false #{operator} false"
- mutation "nil #{operator} false"
mutation "true #{operator} true"
- mutation "true #{operator} nil"
end
end
Mutest::Meta::Example.add :send do
source 'a != b'
@@ -873,6 +859,64 @@
mutation 'self.Array(a)'
mutation 'foo'
mutation 'foo.Array'
mutation 'foo.Array(nil)'
mutation 'foo.Array(self)'
+end
+
+Mutest::Meta::Example.add :send do
+ source 'foo.method(:to_s)'
+
+ singleton_mutations
+ mutation 'foo'
+ mutation 'foo.public_method(:to_s)'
+ mutation ':to_s'
+ mutation 'self.method(:to_s)'
+ mutation 'foo.method'
+ mutation 'foo.method(nil)'
+ mutation 'foo.method(self)'
+ mutation 'foo.method(:to_s__mutest__)'
+ mutation 'foo.method(:to_str)'
+end
+
+Mutest::Meta::Example.add :send do
+ source "foo.public_method('to_i')"
+
+ singleton_mutations
+ mutation 'foo'
+ mutation '"to_i"'
+ mutation 'self.public_method("to_i")'
+ mutation 'foo.public_method'
+ mutation 'foo.public_method(nil)'
+ mutation 'foo.public_method(self)'
+ mutation 'foo.public_method("to_int")'
+ mutation 'foo.public_method("to_i__mutest__")'
+end
+
+Mutest::Meta::Example.add :send do
+ source 'foo.method(bar, baz)'
+
+ singleton_mutations
+ mutation 'foo'
+ mutation 'foo.public_method(bar, baz)'
+ mutation 'self.method(bar, baz)'
+ mutation 'foo.method'
+ mutation 'foo.method(nil, baz)'
+ mutation 'foo.method(self, baz)'
+ mutation 'foo.method(baz)'
+ mutation 'foo.method(bar, nil)'
+ mutation 'foo.method(bar, self)'
+ mutation 'foo.method(bar)'
+end
+
+Mutest::Meta::Example.add :send do
+ source "foo.bar('to_s')"
+
+ singleton_mutations
+ mutation 'foo'
+ mutation '"to_s"'
+ mutation 'self.bar("to_s")'
+ mutation 'foo.bar("to_s__mutest__")'
+ mutation 'foo.bar'
+ mutation 'foo.bar(nil)'
+ mutation 'foo.bar(self)'
end