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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4950653df0e159b7d178e4770ad8ecf03994f1d08c99e4ba3589d9d76131840
4
- data.tar.gz: 143ea75408ac2d9e6fda64e44e4ee1172317a716e593150df323ef6005f04598
3
+ metadata.gz: 7a3308efe39e70e35d8c0fc11294280713c3c69f402e3dc59a30e3a3789a5744
4
+ data.tar.gz: ce590187601f50a475271571b7da3bd744d1b2196fc15f249de3fbec62913de5
5
5
  SHA512:
6
- metadata.gz: efc662d1906386fbbbf011cabebd4d88450169237680c64e52e2e2432dd22f0ae6dc6a0cecddebf0357932b4520be0ec5e4a3aa63cf0734b9d8f0e47d5b8d5b4
7
- data.tar.gz: d0d84126e2bd05e9d6a8b4360821eb4473049f92ac7b7257286b92e48b8c9e1d428ba8bbb7f708e19590c065aa415b1928f58fd50ebeb6ac5decc568afb90b32
6
+ metadata.gz: adc7dd97643cd658857712d4ae220fa167777145e9cae93db73a1c43be9db63a98b03fe549c0b7eac5c595b4b8f80892e8ca1c12fcfcf8385ffdc360d4b95f65
7
+ data.tar.gz: 51e49cfc6d35f60b7b9e5f3bd2c4991ceba3e383a60192a57920aab16860fbebda0f560ec39cf552994c3a1f6319793a0483f9fc3d2b4669ec556b7526df8b8d
@@ -4,7 +4,7 @@ module Mutant
4
4
 
5
5
  # Abstract base class for match expression
6
6
  class Expression
7
- include AbstractType, Adamantium::Flat
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
- def syntax
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
- def syntax
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
- def syntax
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
@@ -16,11 +16,10 @@ module Mutant
16
16
  # @param [Enumerable<Mutant::Test>] tests
17
17
  #
18
18
  # @return [Result::Test]
19
- def call(tests)
19
+ def call(_tests)
20
20
  Result::Test.new(
21
21
  passed: true,
22
- runtime: 0.0,
23
- tests: tests
22
+ runtime: 0.0
24
23
  )
25
24
  end
26
25
 
@@ -121,11 +121,7 @@ module Mutant
121
121
 
122
122
  # Test result
123
123
  class Test
124
- include Result, Anima.new(
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
@@ -3,7 +3,7 @@
3
3
  module Mutant
4
4
  # Abstract base class for test that might kill a mutation
5
5
  class Test
6
- include Adamantium::Flat, Anima.new(
6
+ include Anima.new(
7
7
  :expressions,
8
8
  :id
9
9
  )
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.10.19'
5
+ VERSION = '0.10.20'
6
6
  end # Mutant
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.19
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-14 00:00:00.000000000 Z
11
+ date: 2020-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: abstract_type