atp 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/atp/ast/builder.rb +4 -0
- data/lib/atp/flow.rb +8 -8
- data/lib/atp/processors/flow_id.rb +15 -3
- data/lib/atp/validators/missing_ids.rb +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de3a4282f251dd1dca4bbc42c90514646b390ecb
|
4
|
+
data.tar.gz: 7b7adde092bf2c0c24b6908808de1bdfa64600fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754e3251438749ead9645225e612753284f77dec2e468e376d2c6dba8be75e9b5f9a6374a801b7032bb0af0f0a6b6969f44a0725e6c55172f8f0a8534f4c8b42
|
7
|
+
data.tar.gz: cad825d6fe405ff8cfa77d941a8acec72822a99b4325df4c1bb9449b334adcb8980e93bf1ef8e048b44a80c1539eb4759d00c379ddceaaeb9a5d346e84d41abc
|
data/config/version.rb
CHANGED
data/lib/atp/ast/builder.rb
CHANGED
data/lib/atp/flow.rb
CHANGED
@@ -157,21 +157,19 @@ module ATP
|
|
157
157
|
# Returns true if the test context generated from the supplied options + existing condition
|
158
158
|
# wrappers, is different from that which was applied to the previous test.
|
159
159
|
def context_changed?(options)
|
160
|
-
a = context
|
161
|
-
b = build_context(options)
|
162
|
-
!
|
160
|
+
a = context
|
161
|
+
b = build_context(options)
|
162
|
+
!context_equal?(a, b)
|
163
163
|
end
|
164
164
|
|
165
165
|
def context
|
166
166
|
builder.context
|
167
167
|
end
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
def conditions_equal?(a, b)
|
169
|
+
def context_equal?(a, b)
|
172
170
|
if a.size == b.size
|
173
|
-
a = clean_condition(a)
|
174
|
-
b = clean_condition(b)
|
171
|
+
a = clean_condition(a[:conditions])
|
172
|
+
b = clean_condition(b[:conditions])
|
175
173
|
if a.keys.sort == b.keys.sort
|
176
174
|
a.all? do |key, value|
|
177
175
|
value.flatten.uniq.sort == b[key].flatten.uniq.sort
|
@@ -180,6 +178,8 @@ module ATP
|
|
180
178
|
end
|
181
179
|
end
|
182
180
|
|
181
|
+
private
|
182
|
+
|
183
183
|
def clean_condition(h)
|
184
184
|
c = {}
|
185
185
|
h.each do |hash|
|
@@ -10,15 +10,27 @@ module ATP
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def on_id(node)
|
13
|
-
|
13
|
+
if node.value =~ /^extern/
|
14
|
+
node
|
15
|
+
else
|
16
|
+
node.updated(nil, ["#{node.value}_#{id}"])
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
20
|
def on_test_result(node)
|
17
21
|
tid, state, nodes = *node
|
18
22
|
if tid.is_a?(Array)
|
19
|
-
tid = tid.map
|
23
|
+
tid = tid.map do |tid|
|
24
|
+
if tid =~ /^extern/
|
25
|
+
tid
|
26
|
+
else
|
27
|
+
"#{tid}_#{id}"
|
28
|
+
end
|
29
|
+
end
|
20
30
|
else
|
21
|
-
tid
|
31
|
+
if tid !~ /^extern/
|
32
|
+
tid = "#{tid}_#{id}"
|
33
|
+
end
|
22
34
|
end
|
23
35
|
node.updated(nil, [tid, state] + [process(nodes)])
|
24
36
|
end
|
@@ -40,11 +40,13 @@ module ATP
|
|
40
40
|
def on_test_executed(node)
|
41
41
|
ids = node.to_a[0]
|
42
42
|
[ids].flatten.each do |id|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
@
|
47
|
-
|
43
|
+
unless id =~ /^extern/
|
44
|
+
@referenced_ids[id] ||= []
|
45
|
+
@referenced_ids[id] << node
|
46
|
+
unless @present_ids[id]
|
47
|
+
@referenced_early[id] ||= []
|
48
|
+
@referenced_early[id] << node
|
49
|
+
end
|
48
50
|
end
|
49
51
|
end
|
50
52
|
process_all(node)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: origen
|