mutant 0.10.19 → 0.10.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/expression.rb +5 -1
- data/lib/mutant/expression/method.rb +6 -4
- data/lib/mutant/expression/methods.rb +6 -4
- data/lib/mutant/expression/namespace.rb +4 -6
- data/lib/mutant/integration/null.rb +2 -3
- data/lib/mutant/result.rb +1 -6
- data/lib/mutant/test.rb +1 -1
- data/lib/mutant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a3308efe39e70e35d8c0fc11294280713c3c69f402e3dc59a30e3a3789a5744
|
4
|
+
data.tar.gz: ce590187601f50a475271571b7da3bd744d1b2196fc15f249de3fbec62913de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc7dd97643cd658857712d4ae220fa167777145e9cae93db73a1c43be9db63a98b03fe549c0b7eac5c595b4b8f80892e8ca1c12fcfcf8385ffdc360d4b95f65
|
7
|
+
data.tar.gz: 51e49cfc6d35f60b7b9e5f3bd2c4991ceba3e383a60192a57920aab16860fbebda0f560ec39cf552994c3a1f6319793a0483f9fc3d2b4669ec556b7526df8b8d
|
data/lib/mutant/expression.rb
CHANGED
@@ -4,7 +4,7 @@ module Mutant
|
|
4
4
|
|
5
5
|
# Abstract base class for match expression
|
6
6
|
class Expression
|
7
|
-
include AbstractType
|
7
|
+
include AbstractType
|
8
8
|
|
9
9
|
fragment = /[A-Za-z][A-Za-z\d_]*/.freeze
|
10
10
|
SCOPE_NAME_PATTERN = /(?<scope_name>#{fragment}(?:#{SCOPE_OPERATOR}#{fragment})*)/.freeze
|
@@ -12,6 +12,10 @@ module Mutant
|
|
12
12
|
|
13
13
|
private_constant(*constants(false))
|
14
14
|
|
15
|
+
def self.new(*)
|
16
|
+
super.freeze
|
17
|
+
end
|
18
|
+
|
15
19
|
# Syntax of expression
|
16
20
|
#
|
17
21
|
# @return [Matcher]
|
@@ -26,13 +26,15 @@ module Mutant
|
|
26
26
|
|
27
27
|
REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}#{METHOD_NAME_PATTERN}\z/.freeze
|
28
28
|
|
29
|
+
def initialize(*)
|
30
|
+
super
|
31
|
+
@syntax = [scope_name, scope_symbol, method_name].join.freeze
|
32
|
+
end
|
33
|
+
|
29
34
|
# Syntax of expression
|
30
35
|
#
|
31
36
|
# @return [String]
|
32
|
-
|
33
|
-
[scope_name, scope_symbol, method_name].join
|
34
|
-
end
|
35
|
-
memoize :syntax
|
37
|
+
attr_reader :syntax
|
36
38
|
|
37
39
|
# Matcher for expression
|
38
40
|
#
|
@@ -20,13 +20,15 @@ module Mutant
|
|
20
20
|
|
21
21
|
REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}\z/.freeze
|
22
22
|
|
23
|
+
def initialize(*)
|
24
|
+
super
|
25
|
+
@syntax = [scope_name, scope_symbol].join.freeze
|
26
|
+
end
|
27
|
+
|
23
28
|
# Syntax of expression
|
24
29
|
#
|
25
30
|
# @return [String]
|
26
|
-
|
27
|
-
[scope_name, scope_symbol].join
|
28
|
-
end
|
29
|
-
memoize :syntax
|
31
|
+
attr_reader :syntax
|
30
32
|
|
31
33
|
# Matcher on expression
|
32
34
|
#
|
@@ -16,6 +16,9 @@ module Mutant
|
|
16
16
|
# @return [undefined]
|
17
17
|
def initialize(*)
|
18
18
|
super
|
19
|
+
|
20
|
+
@syntax = "#{scope_name}*"
|
21
|
+
|
19
22
|
@recursion_pattern = Regexp.union(
|
20
23
|
/\A#{scope_name}\z/,
|
21
24
|
/\A#{scope_name}::/,
|
@@ -26,10 +29,7 @@ module Mutant
|
|
26
29
|
# Syntax for expression
|
27
30
|
#
|
28
31
|
# @return [String]
|
29
|
-
|
30
|
-
"#{scope_name}*"
|
31
|
-
end
|
32
|
-
memoize :syntax
|
32
|
+
attr_reader :syntax
|
33
33
|
|
34
34
|
# Matcher for expression
|
35
35
|
#
|
@@ -52,7 +52,6 @@ module Mutant
|
|
52
52
|
0
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
56
55
|
end # Recursive
|
57
56
|
|
58
57
|
# Exact namespace expression
|
@@ -88,7 +87,6 @@ module Mutant
|
|
88
87
|
Object.const_get(scope_name)
|
89
88
|
rescue NameError # rubocop:disable Lint/SuppressedException
|
90
89
|
end
|
91
|
-
|
92
90
|
end # Exact
|
93
91
|
end # Namespace
|
94
92
|
end # Expression
|
data/lib/mutant/result.rb
CHANGED
@@ -121,11 +121,7 @@ module Mutant
|
|
121
121
|
|
122
122
|
# Test result
|
123
123
|
class Test
|
124
|
-
include
|
125
|
-
:passed,
|
126
|
-
:runtime,
|
127
|
-
:tests
|
128
|
-
)
|
124
|
+
include Anima.new(:passed, :runtime)
|
129
125
|
|
130
126
|
class VoidValue < self
|
131
127
|
include Singleton
|
@@ -137,7 +133,6 @@ module Mutant
|
|
137
133
|
super(
|
138
134
|
passed: false,
|
139
135
|
runtime: 0.0,
|
140
|
-
tests: []
|
141
136
|
)
|
142
137
|
end
|
143
138
|
end # VoidValue
|
data/lib/mutant/test.rb
CHANGED
data/lib/mutant/version.rb
CHANGED
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.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abstract_type
|