mutant 0.10.29 → 0.10.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mutant +1 -1
- data/lib/mutant/ast/regexp/transformer/direct.rb +1 -0
- data/lib/mutant/ast/regexp/transformer.rb +3 -1
- data/lib/mutant/ast/types.rb +1 -0
- data/lib/mutant/bootstrap.rb +13 -5
- data/lib/mutant/cli/command/root.rb +1 -1
- data/lib/mutant/cli/command/util.rb +100 -0
- data/lib/mutant/cli/command.rb +2 -0
- data/lib/mutant/config.rb +17 -5
- data/lib/mutant/env.rb +4 -0
- data/lib/mutant/expression.rb +1 -1
- data/lib/mutant/hooks.rb +77 -0
- data/lib/mutant/matcher/config.rb +1 -1
- data/lib/mutant/matcher/methods.rb +1 -1
- data/lib/mutant/mutation.rb +9 -1
- data/lib/mutant/mutator.rb +1 -1
- data/lib/mutant/pipe.rb +2 -0
- data/lib/mutant/registry.rb +4 -4
- data/lib/mutant/reporter/cli/printer/mutation.rb +58 -0
- data/lib/mutant/reporter/cli/printer/mutation_result.rb +2 -22
- data/lib/mutant/repository/diff.rb +1 -1
- data/lib/mutant/transform.rb +1 -1
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant.rb +4 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c20fb3fdc41f7d6e0f8164916206353716c037ec596fccccd06db10c05e810c
|
4
|
+
data.tar.gz: 276612decdc11bf06de38e704fed0d6dc3b9b0b590d9e2f333be7ae383396ca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 652ac4959565f27514568c25c43a0ab64d3af74f9f9de50712bf6e6e825dcf44d27e55e40ff76f0e7c91e27c4199c4f67a0d2205f2268eefae5acc338e2aecb5
|
7
|
+
data.tar.gz: a7e9b023ffefb0d3da5a13d7ec83fbb6696a10efe0f8840b867e8f6e788a55e7d2eabd077173957a697e9f0689ce109fec5d8668078946e317f7c9c4b7216614
|
data/bin/mutant
CHANGED
@@ -74,6 +74,7 @@ module Mutant
|
|
74
74
|
[:regexp_katakana_property, [:property, :katakana, '\p{Katakana}'], ::Regexp::Expression::UnicodeProperty::Script],
|
75
75
|
[:regexp_letter_property, [:property, :letter, '\p{L}'], ::Regexp::Expression::UnicodeProperty::Letter::Any],
|
76
76
|
[:regexp_linebreak_type, [:type, :linebreak, '\R'], ::Regexp::Expression::CharacterType::Linebreak],
|
77
|
+
[:regexp_latin_property, [:property, :latin, '\p{Latin}'], ::Regexp::Expression::UnicodeProperty::Script],
|
77
78
|
[:regexp_lower_posixclass, [:posixclass, :lower, '[:lower:]'], ::Regexp::Expression::PosixClass],
|
78
79
|
[:regexp_mark_keep, [:keep, :mark, '\K'], ::Regexp::Expression::Keep::Mark],
|
79
80
|
[:regexp_match_start_anchor, [:anchor, :match_start, '\\G'], ::Regexp::Expression::Anchor::MatchStart],
|
@@ -11,7 +11,9 @@ module Mutant
|
|
11
11
|
class Transformer
|
12
12
|
include AbstractType
|
13
13
|
|
14
|
-
REGISTRY = Registry.new
|
14
|
+
REGISTRY = Registry.new(
|
15
|
+
->(type) { fail "No regexp transformer registered for: #{type}" }
|
16
|
+
)
|
15
17
|
|
16
18
|
# Lookup transformer class for regular expression node type
|
17
19
|
#
|
data/lib/mutant/ast/types.rb
CHANGED
data/lib/mutant/bootstrap.rb
CHANGED
@@ -31,8 +31,7 @@ module Mutant
|
|
31
31
|
#
|
32
32
|
# rubocop:disable Metrics/MethodLength
|
33
33
|
def self.call(world, config)
|
34
|
-
env = Env
|
35
|
-
.empty(world, config)
|
34
|
+
env = load_hooks(Env.empty(world, config))
|
36
35
|
.tap(&method(:infect))
|
37
36
|
.with(matchable_scopes: matchable_scopes(world, config))
|
38
37
|
|
@@ -49,6 +48,11 @@ module Mutant
|
|
49
48
|
end
|
50
49
|
# rubocop:enable Metrics/MethodLength
|
51
50
|
|
51
|
+
def self.load_hooks(env)
|
52
|
+
env.with(hooks: Hooks.load_config(env.config))
|
53
|
+
end
|
54
|
+
private_class_method :load_hooks
|
55
|
+
|
52
56
|
def self.start_subject(env, subjects)
|
53
57
|
start_expressions = env.config.matcher.start_expressions
|
54
58
|
|
@@ -63,10 +67,14 @@ module Mutant
|
|
63
67
|
private_class_method :start_subject
|
64
68
|
|
65
69
|
def self.infect(env)
|
66
|
-
config, world = env.config, env.world
|
70
|
+
config, hooks, world = env.config, env.hooks, env.world
|
71
|
+
|
72
|
+
hooks.run(:env_infection_pre, env)
|
73
|
+
|
74
|
+
config.includes.each(&world.load_path.public_method(:<<))
|
75
|
+
config.requires.each(&world.kernel.public_method(:require))
|
67
76
|
|
68
|
-
|
69
|
-
config.requires.each(&world.kernel.method(:require))
|
77
|
+
hooks.run(:env_infection_post, env)
|
70
78
|
end
|
71
79
|
private_class_method :infect
|
72
80
|
|
@@ -10,7 +10,7 @@ module Mutant
|
|
10
10
|
class Root < self
|
11
11
|
NAME = 'mutant'
|
12
12
|
SHORT_DESCRIPTION = 'mutation testing engine main command'
|
13
|
-
SUBCOMMANDS = [Environment::Run, Environment, Subscription].freeze
|
13
|
+
SUBCOMMANDS = [Environment::Run, Environment, Subscription, Util].freeze
|
14
14
|
end # Root
|
15
15
|
end # Command
|
16
16
|
end # CLI
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mutant
|
4
|
+
module CLI
|
5
|
+
class Command
|
6
|
+
class Util < self
|
7
|
+
NAME = 'util'
|
8
|
+
SHORT_DESCRIPTION = 'Utility subcommands'
|
9
|
+
|
10
|
+
class Mutation < self
|
11
|
+
NAME = 'mutation'
|
12
|
+
SHORT_DESCRIPTION = 'Print mutations of a code snippet'
|
13
|
+
SUBCOMMANDS = [].freeze
|
14
|
+
OPTIONS = %i[add_target_options].freeze
|
15
|
+
|
16
|
+
def action
|
17
|
+
@targets.each(&method(:print_mutations))
|
18
|
+
Either::Right.new(nil)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
class Target
|
24
|
+
include Adamantium
|
25
|
+
|
26
|
+
def node
|
27
|
+
Unparser.parse(source)
|
28
|
+
end
|
29
|
+
memoize :node
|
30
|
+
|
31
|
+
class File < self
|
32
|
+
include Concord.new(:pathname, :source)
|
33
|
+
|
34
|
+
public :source
|
35
|
+
|
36
|
+
def identification
|
37
|
+
"file:#{pathname}"
|
38
|
+
end
|
39
|
+
end # File
|
40
|
+
|
41
|
+
class Source < self
|
42
|
+
include Concord::Public.new(:source)
|
43
|
+
|
44
|
+
def identification
|
45
|
+
'<cli-source>'
|
46
|
+
end
|
47
|
+
end # source
|
48
|
+
end # Target
|
49
|
+
|
50
|
+
def initialize(_arguments)
|
51
|
+
super
|
52
|
+
|
53
|
+
@targets = []
|
54
|
+
end
|
55
|
+
|
56
|
+
def add_target_options(parser)
|
57
|
+
parser.on('-e', '--evaluate SOURCE') do |source|
|
58
|
+
@targets << Target::Source.new(source)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def print_mutations(target)
|
63
|
+
world.stdout.puts(target.identification)
|
64
|
+
Mutator.mutate(target.node).each do |mutation|
|
65
|
+
Reporter::CLI::Printer::Mutation.call(
|
66
|
+
world.stdout,
|
67
|
+
Mutant::Mutation::Evil.new(target, mutation)
|
68
|
+
)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def parse_remaining_arguments(arguments)
|
73
|
+
@targets.concat(
|
74
|
+
arguments.map do |argument|
|
75
|
+
parse_pathname(argument)
|
76
|
+
.bind(&method(:read_file))
|
77
|
+
.from_right { |error| return Either::Left.new(error) }
|
78
|
+
end
|
79
|
+
)
|
80
|
+
|
81
|
+
Either::Right.new(self)
|
82
|
+
end
|
83
|
+
|
84
|
+
def read_file(pathname)
|
85
|
+
Either::Right.new(Target::File.new(pathname, pathname.read))
|
86
|
+
rescue StandardError => exception
|
87
|
+
Either::Left.new("Cannot read file: #{exception}")
|
88
|
+
end
|
89
|
+
|
90
|
+
def parse_pathname(input)
|
91
|
+
Either.wrap_error(ArgumentError) { Pathname.new(input) }
|
92
|
+
.lmap(&:message)
|
93
|
+
end
|
94
|
+
end # Mutation
|
95
|
+
|
96
|
+
SUBCOMMANDS = [Mutation].freeze
|
97
|
+
end # Util
|
98
|
+
end # Command
|
99
|
+
end # CLI
|
100
|
+
end # Mutant
|
data/lib/mutant/cli/command.rb
CHANGED
data/lib/mutant/config.rb
CHANGED
@@ -10,6 +10,7 @@ module Mutant
|
|
10
10
|
:coverage_criteria,
|
11
11
|
:expression_parser,
|
12
12
|
:fail_fast,
|
13
|
+
:hooks,
|
13
14
|
:includes,
|
14
15
|
:integration,
|
15
16
|
:isolation,
|
@@ -49,11 +50,12 @@ module Mutant
|
|
49
50
|
other.with(
|
50
51
|
coverage_criteria: coverage_criteria.merge(other.coverage_criteria),
|
51
52
|
fail_fast: fail_fast || other.fail_fast,
|
53
|
+
hooks: hooks + other.hooks,
|
52
54
|
includes: includes + other.includes,
|
53
|
-
jobs: other.jobs || jobs,
|
54
55
|
integration: other.integration || integration,
|
55
|
-
|
56
|
+
jobs: other.jobs || jobs,
|
56
57
|
matcher: matcher.merge(other.matcher),
|
58
|
+
mutation_timeout: other.mutation_timeout || mutation_timeout,
|
57
59
|
requires: requires + other.requires,
|
58
60
|
zombie: zombie || other.zombie
|
59
61
|
)
|
@@ -106,20 +108,30 @@ module Mutant
|
|
106
108
|
DEFAULT.with(jobs: Etc.nprocessors)
|
107
109
|
end
|
108
110
|
|
111
|
+
PATHNAME_ARRAY = Transform::Array.new(
|
112
|
+
Transform::Sequence.new(
|
113
|
+
[
|
114
|
+
Transform::STRING,
|
115
|
+
Transform::Exception.new(ArgumentError, Pathname.public_method(:new))
|
116
|
+
]
|
117
|
+
)
|
118
|
+
)
|
119
|
+
|
109
120
|
TRANSFORM = Transform::Sequence.new(
|
110
121
|
[
|
111
122
|
Transform::Exception.new(SystemCallError, :read.to_proc),
|
112
|
-
Transform::Exception.new(YAML::SyntaxError, YAML.
|
123
|
+
Transform::Exception.new(YAML::SyntaxError, YAML.public_method(:safe_load)),
|
113
124
|
Transform::Hash.new(
|
114
125
|
optional: [
|
115
126
|
Transform::Hash::Key.new('coverage_criteria', ->(value) { CoverageCriteria::TRANSFORM.call(value) }),
|
116
127
|
Transform::Hash::Key.new('fail_fast', Transform::BOOLEAN),
|
128
|
+
Transform::Hash::Key.new('hooks', PATHNAME_ARRAY),
|
117
129
|
Transform::Hash::Key.new('includes', Transform::STRING_ARRAY),
|
118
130
|
Transform::Hash::Key.new('integration', Transform::STRING),
|
119
131
|
Transform::Hash::Key.new('jobs', Transform::INTEGER),
|
132
|
+
Transform::Hash::Key.new('matcher', Matcher::Config::LOADER),
|
120
133
|
Transform::Hash::Key.new('mutation_timeout', Transform::FLOAT),
|
121
|
-
Transform::Hash::Key.new('requires', Transform::STRING_ARRAY)
|
122
|
-
Transform::Hash::Key.new('matcher', Matcher::Config::LOADER)
|
134
|
+
Transform::Hash::Key.new('requires', Transform::STRING_ARRAY)
|
123
135
|
],
|
124
136
|
required: []
|
125
137
|
),
|
data/lib/mutant/env.rb
CHANGED
@@ -5,6 +5,7 @@ module Mutant
|
|
5
5
|
class Env
|
6
6
|
include Adamantium, Anima.new(
|
7
7
|
:config,
|
8
|
+
:hooks,
|
8
9
|
:integration,
|
9
10
|
:matchable_scopes,
|
10
11
|
:mutations,
|
@@ -29,6 +30,7 @@ module Mutant
|
|
29
30
|
def self.empty(world, config)
|
30
31
|
new(
|
31
32
|
config: config,
|
33
|
+
hooks: Hooks.empty,
|
32
34
|
integration: Integration::Null.new(
|
33
35
|
expression_parser: config.expression_parser,
|
34
36
|
world: world
|
@@ -136,7 +138,9 @@ module Mutant
|
|
136
138
|
|
137
139
|
def run_mutation_tests(mutation, tests)
|
138
140
|
config.isolation.call(config.mutation_timeout) do
|
141
|
+
hooks.run(:mutation_insert_pre, mutation)
|
139
142
|
result = mutation.insert(world.kernel)
|
143
|
+
hooks.run(:mutation_insert_post, mutation)
|
140
144
|
|
141
145
|
if result.equal?(Loader::Result::VoidValue.instance)
|
142
146
|
Result::Test::VoidValue.instance
|
data/lib/mutant/expression.rb
CHANGED
data/lib/mutant/hooks.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mutant
|
4
|
+
class Hooks
|
5
|
+
include Adamantium, Concord::Public.new(:map)
|
6
|
+
|
7
|
+
DEFAULTS = %i[
|
8
|
+
env_infection_pre
|
9
|
+
env_infection_post
|
10
|
+
mutation_insert_post
|
11
|
+
mutation_insert_pre
|
12
|
+
].product([EMPTY_ARRAY]).to_h.transform_values(&:freeze).freeze
|
13
|
+
|
14
|
+
MESSAGE = 'Unknown hook %s'
|
15
|
+
|
16
|
+
private_constant(*constants(false))
|
17
|
+
|
18
|
+
class UnknownHook < RuntimeError; end
|
19
|
+
|
20
|
+
def self.assert_name(name)
|
21
|
+
fail UnknownHook, MESSAGE % name.inspect unless DEFAULTS.key?(name)
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.empty
|
26
|
+
new(DEFAULTS)
|
27
|
+
end
|
28
|
+
|
29
|
+
def merge(other)
|
30
|
+
self.class.new(
|
31
|
+
other.map.merge(map) { |_key, new, old| (old + new).freeze }.freeze
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def run(name, payload)
|
36
|
+
Hooks.assert_name(name)
|
37
|
+
|
38
|
+
map.fetch(name).each { |block| block.call(payload) }
|
39
|
+
|
40
|
+
self
|
41
|
+
end
|
42
|
+
|
43
|
+
class Builder
|
44
|
+
def initialize
|
45
|
+
@map = DEFAULTS.transform_values(&:dup)
|
46
|
+
end
|
47
|
+
|
48
|
+
def register(name, &block)
|
49
|
+
Hooks.assert_name(name)
|
50
|
+
|
51
|
+
@map.fetch(name) << block
|
52
|
+
|
53
|
+
self
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_hooks
|
57
|
+
Hooks.new(@map.transform_values(&:freeze).freeze)
|
58
|
+
end
|
59
|
+
end # Builder
|
60
|
+
|
61
|
+
# rubocop:disable Security/Eval
|
62
|
+
def self.load_pathname(pathname)
|
63
|
+
hooks = Builder.new
|
64
|
+
|
65
|
+
binding.eval(pathname.read, pathname.to_s)
|
66
|
+
|
67
|
+
hooks.to_hooks
|
68
|
+
end
|
69
|
+
# rubocop:enable Security/Eval
|
70
|
+
|
71
|
+
def self.load_config(config)
|
72
|
+
config.hooks.reduce(empty) do |current, path|
|
73
|
+
current.merge(load_pathname(path))
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end # Hooks
|
77
|
+
end # Mutant
|
@@ -25,7 +25,7 @@ module Mutant
|
|
25
25
|
|
26
26
|
private_constant(*constants(false))
|
27
27
|
|
28
|
-
DEFAULT = new(
|
28
|
+
DEFAULT = new(anima.attribute_names.map { |name| [name, []] }.to_h)
|
29
29
|
|
30
30
|
expression = Transform::Block.capture(:expression) do |input|
|
31
31
|
Mutant::Config::DEFAULT.expression_parser.call(input)
|
data/lib/mutant/mutation.rb
CHANGED
@@ -72,6 +72,15 @@ module Mutant
|
|
72
72
|
)
|
73
73
|
end
|
74
74
|
|
75
|
+
# Rendered mutation diff
|
76
|
+
#
|
77
|
+
# @return [String, nil]
|
78
|
+
# the diff, if present
|
79
|
+
def diff
|
80
|
+
Unparser::Diff.build(original_source, source)
|
81
|
+
end
|
82
|
+
memoize :diff
|
83
|
+
|
75
84
|
private
|
76
85
|
|
77
86
|
def sha1
|
@@ -80,7 +89,6 @@ module Mutant
|
|
80
89
|
|
81
90
|
# Evil mutation that should case mutations to fail tests
|
82
91
|
class Evil < self
|
83
|
-
|
84
92
|
SYMBOL = 'evil'
|
85
93
|
TEST_PASS_SUCCESS = false
|
86
94
|
|
data/lib/mutant/mutator.rb
CHANGED
data/lib/mutant/pipe.rb
CHANGED
@@ -57,6 +57,7 @@ module Mutant
|
|
57
57
|
|
58
58
|
fail Error, 'message to big' if bytesize > MAX_BYTES
|
59
59
|
|
60
|
+
io.binmode
|
60
61
|
io.write([bytesize].pack(HEADER_FORMAT))
|
61
62
|
io.write(body)
|
62
63
|
end
|
@@ -64,6 +65,7 @@ module Mutant
|
|
64
65
|
private
|
65
66
|
|
66
67
|
def read(bytes)
|
68
|
+
io.binmode
|
67
69
|
io.read(bytes) or fail Error, 'Unexpected EOF'
|
68
70
|
end
|
69
71
|
end
|
data/lib/mutant/registry.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
module Mutant
|
4
4
|
# Registry for mapping AST types to classes
|
5
5
|
class Registry
|
6
|
-
include Concord.new(:contents)
|
6
|
+
include Concord.new(:contents, :default)
|
7
7
|
|
8
8
|
# Initialize object
|
9
9
|
#
|
10
10
|
# @return [undefined]
|
11
|
-
def initialize
|
12
|
-
super({})
|
11
|
+
def initialize(default)
|
12
|
+
super({}, default)
|
13
13
|
end
|
14
14
|
|
15
15
|
# Raised when the type is an invalid type
|
@@ -34,7 +34,7 @@ module Mutant
|
|
34
34
|
#
|
35
35
|
# @return [Class<Mutator>]
|
36
36
|
def lookup(type)
|
37
|
-
contents.fetch(type,
|
37
|
+
contents.fetch(type, &default)
|
38
38
|
end
|
39
39
|
|
40
40
|
end # Registry
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mutant
|
4
|
+
class Reporter
|
5
|
+
class CLI
|
6
|
+
class Printer
|
7
|
+
# Reporter for mutations
|
8
|
+
class Mutation < self
|
9
|
+
NO_DIFF_MESSAGE = <<~'MESSAGE'
|
10
|
+
--- Internal failure ---
|
11
|
+
BUG: A generted mutation did not result in exactly one diff hunk!
|
12
|
+
This is an invariant violation by the mutation generation engine.
|
13
|
+
Please report a reproduction to https://github.com/mbj/mutant
|
14
|
+
Original unparsed source:
|
15
|
+
%s
|
16
|
+
Original AST:
|
17
|
+
%s
|
18
|
+
Mutated unparsed source:
|
19
|
+
%s
|
20
|
+
Mutated AST:
|
21
|
+
%s
|
22
|
+
MESSAGE
|
23
|
+
|
24
|
+
SEPARATOR = '-----------------------'
|
25
|
+
|
26
|
+
# Run report printer
|
27
|
+
#
|
28
|
+
# @return [undefined]
|
29
|
+
def run
|
30
|
+
diff = object.diff
|
31
|
+
diff = color? ? diff.colorized_diff : diff.diff
|
32
|
+
|
33
|
+
if diff
|
34
|
+
output.write(diff)
|
35
|
+
else
|
36
|
+
print_no_diff_message
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def print_no_diff_message
|
41
|
+
info(
|
42
|
+
NO_DIFF_MESSAGE,
|
43
|
+
object.original_source,
|
44
|
+
original_node.inspect,
|
45
|
+
object.source,
|
46
|
+
object.node.inspect
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def original_node
|
51
|
+
object.subject.node
|
52
|
+
end
|
53
|
+
|
54
|
+
end # MutationResult
|
55
|
+
end # Printer
|
56
|
+
end # CLI
|
57
|
+
end # Reporter
|
58
|
+
end # Mutant
|
@@ -66,23 +66,7 @@ module Mutant
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def evil_details
|
69
|
-
|
70
|
-
diff = color? ? diff.colorized_diff : diff.diff
|
71
|
-
if diff
|
72
|
-
output.write(diff)
|
73
|
-
else
|
74
|
-
print_no_diff_message
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def print_no_diff_message
|
79
|
-
info(
|
80
|
-
NO_DIFF_MESSAGE,
|
81
|
-
mutation.original_source,
|
82
|
-
original_node.inspect,
|
83
|
-
mutation.source,
|
84
|
-
mutation.node.inspect
|
85
|
-
)
|
69
|
+
visit(Mutation, mutation)
|
86
70
|
end
|
87
71
|
|
88
72
|
def noop_details
|
@@ -90,11 +74,7 @@ module Mutant
|
|
90
74
|
end
|
91
75
|
|
92
76
|
def neutral_details
|
93
|
-
info(NEUTRAL_MESSAGE,
|
94
|
-
end
|
95
|
-
|
96
|
-
def original_node
|
97
|
-
mutation.subject.node
|
77
|
+
info(NEUTRAL_MESSAGE, mutation.node.inspect, mutation.source)
|
98
78
|
end
|
99
79
|
|
100
80
|
end # MutationResult
|
data/lib/mutant/transform.rb
CHANGED
data/lib/mutant/version.rb
CHANGED
data/lib/mutant.rb
CHANGED
@@ -186,6 +186,7 @@ require 'mutant/selector'
|
|
186
186
|
require 'mutant/selector/expression'
|
187
187
|
require 'mutant/selector/null'
|
188
188
|
require 'mutant/world'
|
189
|
+
require 'mutant/hooks'
|
189
190
|
require 'mutant/config'
|
190
191
|
require 'mutant/config/coverage_criteria'
|
191
192
|
require 'mutant/cli'
|
@@ -196,6 +197,7 @@ require 'mutant/cli/command/environment/run'
|
|
196
197
|
require 'mutant/cli/command/environment/show'
|
197
198
|
require 'mutant/cli/command/environment/subject'
|
198
199
|
require 'mutant/cli/command/environment/test'
|
200
|
+
require 'mutant/cli/command/util'
|
199
201
|
require 'mutant/cli/command/root'
|
200
202
|
require 'mutant/runner'
|
201
203
|
require 'mutant/runner/sink'
|
@@ -211,6 +213,7 @@ require 'mutant/reporter/cli/printer/env'
|
|
211
213
|
require 'mutant/reporter/cli/printer/env_progress'
|
212
214
|
require 'mutant/reporter/cli/printer/env_result'
|
213
215
|
require 'mutant/reporter/cli/printer/isolation_result'
|
216
|
+
require 'mutant/reporter/cli/printer/mutation'
|
214
217
|
require 'mutant/reporter/cli/printer/mutation_result'
|
215
218
|
require 'mutant/reporter/cli/printer/status_progressive'
|
216
219
|
require 'mutant/reporter/cli/printer/subject_result'
|
@@ -257,6 +260,7 @@ module Mutant
|
|
257
260
|
Expression::Namespace::Recursive
|
258
261
|
]),
|
259
262
|
fail_fast: false,
|
263
|
+
hooks: EMPTY_ARRAY,
|
260
264
|
includes: EMPTY_ARRAY,
|
261
265
|
integration: nil,
|
262
266
|
isolation: Mutant::Isolation::Fork.new(WORLD),
|
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.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- lib/mutant/cli/command/environment/test.rb
|
187
187
|
- lib/mutant/cli/command/root.rb
|
188
188
|
- lib/mutant/cli/command/subscription.rb
|
189
|
+
- lib/mutant/cli/command/util.rb
|
189
190
|
- lib/mutant/config.rb
|
190
191
|
- lib/mutant/config/coverage_criteria.rb
|
191
192
|
- lib/mutant/context.rb
|
@@ -195,6 +196,7 @@ files:
|
|
195
196
|
- lib/mutant/expression/methods.rb
|
196
197
|
- lib/mutant/expression/namespace.rb
|
197
198
|
- lib/mutant/expression/parser.rb
|
199
|
+
- lib/mutant/hooks.rb
|
198
200
|
- lib/mutant/integration.rb
|
199
201
|
- lib/mutant/integration/null.rb
|
200
202
|
- lib/mutant/isolation.rb
|
@@ -315,6 +317,7 @@ files:
|
|
315
317
|
- lib/mutant/reporter/cli/printer/env_progress.rb
|
316
318
|
- lib/mutant/reporter/cli/printer/env_result.rb
|
317
319
|
- lib/mutant/reporter/cli/printer/isolation_result.rb
|
320
|
+
- lib/mutant/reporter/cli/printer/mutation.rb
|
318
321
|
- lib/mutant/reporter/cli/printer/mutation_result.rb
|
319
322
|
- lib/mutant/reporter/cli/printer/status_progressive.rb
|
320
323
|
- lib/mutant/reporter/cli/printer/subject_result.rb
|
@@ -363,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
363
366
|
- !ruby/object:Gem::Version
|
364
367
|
version: '0'
|
365
368
|
requirements: []
|
366
|
-
rubygems_version: 3.1.
|
369
|
+
rubygems_version: 3.1.6
|
367
370
|
signing_key:
|
368
371
|
specification_version: 4
|
369
372
|
summary: ''
|