slather 1.8.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +1 -0
- data/CHANGELOG.md +21 -1
- data/README.md +15 -10
- data/README_Images/test_scheme.png +0 -0
- data/Rakefile +6 -0
- data/bin/slather +45 -6
- data/lib/slather/coverage_file.rb +37 -90
- data/lib/slather/coverage_info.rb +84 -0
- data/lib/slather/coverage_service/cobertura_xml_output.rb +10 -6
- data/lib/slather/coverage_service/coveralls.rb +5 -1
- data/lib/slather/coverage_service/gutter_json_output.rb +12 -8
- data/lib/slather/coverage_service/hardcover.rb +5 -1
- data/lib/slather/coverage_service/html_output.rb +32 -19
- data/lib/slather/coverage_service/simple_output.rb +5 -1
- data/lib/slather/{coveralls_coverage_file.rb → coveralls_coverage.rb} +1 -1
- data/lib/slather/profdata_coverage_file.rb +130 -0
- data/lib/slather/project.rb +191 -27
- data/lib/slather/version.rb +1 -1
- data/lib/slather.rb +9 -1
- data/slather.gemspec +4 -4
- data/spec/fixtures/cobertura.xml +56 -79
- data/spec/fixtures/fixtures/Fixtures.swift +15 -0
- data/spec/fixtures/fixtures/other_fixtures.m +23 -0
- data/spec/fixtures/fixtures_html/Branches.m.html +244 -258
- data/spec/fixtures/fixtures_html/BranchesTests.m.html +209 -225
- data/spec/fixtures/fixtures_html/fixtures.m.html +134 -148
- data/spec/fixtures/fixtures_html/fixturesTests.m.html +199 -213
- data/spec/fixtures/fixtures_html/index.html +68 -131
- data/spec/fixtures/fixtures_html/peekaviewTests.m.html +189 -203
- data/spec/fixtures/gutter.json +1 -1
- data/spec/slather/coverage_file_spec.rb +20 -12
- data/spec/slather/coverage_service/cobertura_xml_spec.rb +7 -3
- data/spec/slather/coverage_service/coveralls_spec.rb +61 -20
- data/spec/slather/coverage_service/gutter_json_spec.rb +6 -2
- data/spec/slather/coverage_service/hardcover_spec.rb +33 -3
- data/spec/slather/coverage_service/html_output_spec.rb +48 -7
- data/spec/slather/coverage_service/simple_output_spec.rb +12 -13
- data/spec/slather/profdata_coverage_spec.rb +128 -0
- data/spec/slather/project_spec.rb +222 -49
- data/spec/spec_helper.rb +28 -2
- metadata +58 -46
- data/spec/fixtures/fixtures_html/Empty.m.html +0 -30
- data/spec/fixtures/fixtures_html/fixtures_cpp.cpp.html +0 -30
- data/spec/fixtures/fixtures_html/fixtures_m.m.html +0 -30
- data/spec/fixtures/fixtures_html/fixtures_mm.mm.html +0 -30
- data/spec/fixtures/fixtures_html/peekaview.m.html +0 -190
@@ -1,206 +1,192 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
</table>
|
193
|
-
</div>
|
194
|
-
</div>
|
195
|
-
<footer>
|
196
|
-
<div class="row">
|
197
|
-
<p><a href="https://github.com/venmo/slather">Fork me on Github</a></p>
|
198
|
-
<p>© 2015 Slather</p>
|
199
|
-
</div>
|
200
|
-
</footer>
|
201
|
-
|
202
|
-
<script src="../../../assets/highlight.pack.js"></script>
|
203
|
-
<script>hljs.initHighlightingOnLoad();</script>
|
204
|
-
|
205
|
-
</body>
|
3
|
+
<head>
|
4
|
+
<title>peekaviewTests.m - Slather</title>
|
5
|
+
<link href="/Users/civetta/Works/Personal/slather/viteinfinite-slather/assets/slather.css" media="all" rel="stylesheet">
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<header><div class="row"><a href="index.html"><img src="/Users/civetta/Works/Personal/slather/viteinfinite-slather/docs/logo.jpg" alt="Slather logo"></a></div></header><div class="row"><div id="reports">
|
9
|
+
<h2 class="cov_title">
|
10
|
+
<span>Coverage for "peekaviewTests.m" : </span><span class="cov_high">100.00%</span>
|
11
|
+
</h2>
|
12
|
+
<h4 class="cov_subtitle">(11 of 11 relevant lines covered)</h4>
|
13
|
+
<h4 class="cov_filepath">spec/fixtures/fixturesTests/peekaviewTests.m</h4>
|
14
|
+
<table class="source_code">
|
15
|
+
<tr class="never">
|
16
|
+
<td class="num">1</td>
|
17
|
+
<td class="src"><pre><code class="objc">//</code></pre></td>
|
18
|
+
<td class="coverage"></td>
|
19
|
+
</tr>
|
20
|
+
<tr class="never">
|
21
|
+
<td class="num">2</td>
|
22
|
+
<td class="src"><pre><code class="objc">// peekaviewTests.m</code></pre></td>
|
23
|
+
<td class="coverage"></td>
|
24
|
+
</tr>
|
25
|
+
<tr class="never">
|
26
|
+
<td class="num">3</td>
|
27
|
+
<td class="src"><pre><code class="objc">// fixtures</code></pre></td>
|
28
|
+
<td class="coverage"></td>
|
29
|
+
</tr>
|
30
|
+
<tr class="never">
|
31
|
+
<td class="num">4</td>
|
32
|
+
<td class="src"><pre><code class="objc">//</code></pre></td>
|
33
|
+
<td class="coverage"></td>
|
34
|
+
</tr>
|
35
|
+
<tr class="never">
|
36
|
+
<td class="num">5</td>
|
37
|
+
<td class="src"><pre><code class="objc">// Created by Mark Larsen on 6/25/14.</code></pre></td>
|
38
|
+
<td class="coverage"></td>
|
39
|
+
</tr>
|
40
|
+
<tr class="never">
|
41
|
+
<td class="num">6</td>
|
42
|
+
<td class="src"><pre><code class="objc">// Copyright (c) 2014 marklarr. All rights reserved.</code></pre></td>
|
43
|
+
<td class="coverage"></td>
|
44
|
+
</tr>
|
45
|
+
<tr class="never">
|
46
|
+
<td class="num">7</td>
|
47
|
+
<td class="src"><pre><code class="objc">//</code></pre></td>
|
48
|
+
<td class="coverage"></td>
|
49
|
+
</tr>
|
50
|
+
<tr class="never">
|
51
|
+
<td class="num">8</td>
|
52
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
53
|
+
<td class="coverage"></td>
|
54
|
+
</tr>
|
55
|
+
<tr class="never">
|
56
|
+
<td class="num">9</td>
|
57
|
+
<td class="src"><pre><code class="objc">#import <XCTest/XCTest.h></code></pre></td>
|
58
|
+
<td class="coverage"></td>
|
59
|
+
</tr>
|
60
|
+
<tr class="never">
|
61
|
+
<td class="num">10</td>
|
62
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
63
|
+
<td class="coverage"></td>
|
64
|
+
</tr>
|
65
|
+
<tr class="never">
|
66
|
+
<td class="num">11</td>
|
67
|
+
<td class="src"><pre><code class="objc">@interface peekaviewTests : XCTestCase</code></pre></td>
|
68
|
+
<td class="coverage"></td>
|
69
|
+
</tr>
|
70
|
+
<tr class="never">
|
71
|
+
<td class="num">12</td>
|
72
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
73
|
+
<td class="coverage"></td>
|
74
|
+
</tr>
|
75
|
+
<tr class="never">
|
76
|
+
<td class="num">13</td>
|
77
|
+
<td class="src"><pre><code class="objc">@end</code></pre></td>
|
78
|
+
<td class="coverage"></td>
|
79
|
+
</tr>
|
80
|
+
<tr class="never">
|
81
|
+
<td class="num">14</td>
|
82
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
83
|
+
<td class="coverage"></td>
|
84
|
+
</tr>
|
85
|
+
<tr class="never">
|
86
|
+
<td class="num">15</td>
|
87
|
+
<td class="src"><pre><code class="objc">@implementation peekaviewTests</code></pre></td>
|
88
|
+
<td class="coverage"></td>
|
89
|
+
</tr>
|
90
|
+
<tr class="never">
|
91
|
+
<td class="num">16</td>
|
92
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
93
|
+
<td class="coverage"></td>
|
94
|
+
</tr>
|
95
|
+
<tr class="never">
|
96
|
+
<td class="num">17</td>
|
97
|
+
<td class="src"><pre><code class="objc">- (void)setUp</code></pre></td>
|
98
|
+
<td class="coverage"></td>
|
99
|
+
</tr>
|
100
|
+
<tr class="covered">
|
101
|
+
<td class="num">18</td>
|
102
|
+
<td class="src"><pre><code class="objc">{</code></pre></td>
|
103
|
+
<td class="coverage">1x</td>
|
104
|
+
</tr>
|
105
|
+
<tr class="covered">
|
106
|
+
<td class="num">19</td>
|
107
|
+
<td class="src"><pre><code class="objc"> [super setUp];</code></pre></td>
|
108
|
+
<td class="coverage">1x</td>
|
109
|
+
</tr>
|
110
|
+
<tr class="covered">
|
111
|
+
<td class="num">20</td>
|
112
|
+
<td class="src"><pre><code class="objc"> // Put setup code here. This method is called before the invocation of each test method in the class.</code></pre></td>
|
113
|
+
<td class="coverage">1x</td>
|
114
|
+
</tr>
|
115
|
+
<tr class="covered">
|
116
|
+
<td class="num">21</td>
|
117
|
+
<td class="src"><pre><code class="objc">}</code></pre></td>
|
118
|
+
<td class="coverage">1x</td>
|
119
|
+
</tr>
|
120
|
+
<tr class="never">
|
121
|
+
<td class="num">22</td>
|
122
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
123
|
+
<td class="coverage"></td>
|
124
|
+
</tr>
|
125
|
+
<tr class="never">
|
126
|
+
<td class="num">23</td>
|
127
|
+
<td class="src"><pre><code class="objc">- (void)tearDown</code></pre></td>
|
128
|
+
<td class="coverage"></td>
|
129
|
+
</tr>
|
130
|
+
<tr class="covered">
|
131
|
+
<td class="num">24</td>
|
132
|
+
<td class="src"><pre><code class="objc">{</code></pre></td>
|
133
|
+
<td class="coverage">1x</td>
|
134
|
+
</tr>
|
135
|
+
<tr class="covered">
|
136
|
+
<td class="num">25</td>
|
137
|
+
<td class="src"><pre><code class="objc"> // Put teardown code here. This method is called after the invocation of each test method in the class.</code></pre></td>
|
138
|
+
<td class="coverage">1x</td>
|
139
|
+
</tr>
|
140
|
+
<tr class="covered">
|
141
|
+
<td class="num">26</td>
|
142
|
+
<td class="src"><pre><code class="objc"> [super tearDown];</code></pre></td>
|
143
|
+
<td class="coverage">1x</td>
|
144
|
+
</tr>
|
145
|
+
<tr class="covered">
|
146
|
+
<td class="num">27</td>
|
147
|
+
<td class="src"><pre><code class="objc">}</code></pre></td>
|
148
|
+
<td class="coverage">1x</td>
|
149
|
+
</tr>
|
150
|
+
<tr class="never">
|
151
|
+
<td class="num">28</td>
|
152
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
153
|
+
<td class="coverage"></td>
|
154
|
+
</tr>
|
155
|
+
<tr class="never">
|
156
|
+
<td class="num">29</td>
|
157
|
+
<td class="src"><pre><code class="objc">- (void)testExample</code></pre></td>
|
158
|
+
<td class="coverage"></td>
|
159
|
+
</tr>
|
160
|
+
<tr class="covered">
|
161
|
+
<td class="num">30</td>
|
162
|
+
<td class="src"><pre><code class="objc">{</code></pre></td>
|
163
|
+
<td class="coverage">1x</td>
|
164
|
+
</tr>
|
165
|
+
<tr class="covered">
|
166
|
+
<td class="num">31</td>
|
167
|
+
<td class="src"><pre><code class="objc"> XCTAssert(YES, @"woot");</code></pre></td>
|
168
|
+
<td class="coverage">1x</td>
|
169
|
+
</tr>
|
170
|
+
<tr class="covered">
|
171
|
+
<td class="num">32</td>
|
172
|
+
<td class="src"><pre><code class="objc">}</code></pre></td>
|
173
|
+
<td class="coverage">1x</td>
|
174
|
+
</tr>
|
175
|
+
<tr class="never">
|
176
|
+
<td class="num">33</td>
|
177
|
+
<td class="src"><pre><code class="objc"></code></pre></td>
|
178
|
+
<td class="coverage"></td>
|
179
|
+
</tr>
|
180
|
+
<tr class="never">
|
181
|
+
<td class="num">34</td>
|
182
|
+
<td class="src"><pre><code class="objc">@end</code></pre></td>
|
183
|
+
<td class="coverage"></td>
|
184
|
+
</tr>
|
185
|
+
</table>
|
186
|
+
</div></div>
|
187
|
+
<footer><div class="row">
|
188
|
+
<p><a href="https://github.com/venmo/slather">Fork me on Github</a></p>
|
189
|
+
<p>© 2016 Slather</p>
|
190
|
+
</div></footer><script src="/Users/civetta/Works/Personal/slather/viteinfinite-slather/assets/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script>
|
191
|
+
</body>
|
206
192
|
</html>
|
data/spec/fixtures/gutter.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"meta":{"timestamp":"2014-10-12 15:21:21.865519"},"symbols_by_file":{"spec/fixtures/fixtures/more_files/Branches.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":16,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":19,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":20,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":21,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"-"},{"line":29,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":30,"long_text":"","short_text":"-"},{"line":31,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":32,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":33,"long_text":"","short_text":"-"},{"line":34,"long_text":"","short_text":"-"},{"line":35,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":36,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":37,"long_text":"","short_text":"-"},{"line":38,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":39,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":40,"long_text":"","short_text":"-"},{"line":41,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":42,"long_text":"","short_text":"-"},{"line":43,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":44,"long_text":"","short_text":"-"},{"line":45,"long_text":"","short_text":"-"}],"spec/fixtures/fixtures/fixtures.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":16,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"-"},{"line":20,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":21,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"}],"spec/fixtures/fixtures/more_files/peekaview.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":16,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":19,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":20,"long_text":"","short_text":"#####","background_color":"0xFC635E"},{"line":21,"long_text":"","short_text":"-"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"-"},{"line":26,"long_text":"","short_text":"-"},{"line":27,"long_text":"","short_text":"-"},{"line":28,"long_text":"","short_text":"-"},{"line":29,"long_text":"","short_text":"-"},{"line":30,"long_text":"","short_text":"-"},{"line":31,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/BranchesTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":20,"long_text":"","short_text":"-"},{"line":21,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"-"},{"line":28,"long_text":"","short_text":"-"},{"line":29,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":30,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":31,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":32,"long_text":"","short_text":"-"},{"line":33,"long_text":"","short_text":"-"},{"line":34,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":35,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":36,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":37,"long_text":"","short_text":"-"},{"line":38,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/fixturesTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"-"},{"line":20,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":21,"long_text":"","short_text":"-"},{"line":22,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"-"},{"line":26,"long_text":"","short_text":"-"},{"line":27,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":29,"long_text":"","short_text":"-"},{"line":30,"long_text":"","short_text":"-"},{"line":31,"long_text":"","short_text":"-"},{"line":32,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":33,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":34,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":35,"long_text":"","short_text":"-"},{"line":36,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/peekaviewTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":20,"long_text":"","short_text":"-"},{"line":21,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"-"},{"line":26,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"-"},{"line":29,"long_text":"","short_text":"-"},{"line":30,"long_text":"","short_text":"-"},{"line":31,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":32,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":33,"long_text":"","short_text":"-"},{"line":34,"long_text":"","short_text":"-"}]}}
|
1
|
+
{"meta":{"timestamp":"2016-01-18 15:39:23.908507"},"symbols_by_file":{"spec/fixtures/fixtures/fixtures.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":15,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":16,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":20,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":21,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"}],"spec/fixtures/fixtures/more_files/Branches.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":15,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":16,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":17,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":18,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":19,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":20,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":21,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":23,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":24,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":25,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":29,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":30,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":31,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":32,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":33,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":34,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":35,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":36,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":37,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":38,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":39,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":40,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":41,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":42,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":43,"long_text":"","short_text":"0","background_color":"0xFC635E"},{"line":44,"long_text":"","short_text":"-"},{"line":45,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/BranchesTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":19,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":20,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":21,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":24,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":25,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"2","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"-"},{"line":28,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":29,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":30,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":31,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":32,"long_text":"","short_text":"-"},{"line":33,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":34,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":35,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":36,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":37,"long_text":"","short_text":"-"},{"line":38,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/fixturesTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"-"},{"line":19,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":20,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":21,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"-"},{"line":25,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":29,"long_text":"","short_text":"-"},{"line":30,"long_text":"","short_text":"-"},{"line":31,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":32,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":33,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":34,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":35,"long_text":"","short_text":"-"},{"line":36,"long_text":"","short_text":"-"}],"spec/fixtures/fixturesTests/peekaviewTests.m":[{"line":1,"long_text":"","short_text":"-"},{"line":2,"long_text":"","short_text":"-"},{"line":3,"long_text":"","short_text":"-"},{"line":4,"long_text":"","short_text":"-"},{"line":5,"long_text":"","short_text":"-"},{"line":6,"long_text":"","short_text":"-"},{"line":7,"long_text":"","short_text":"-"},{"line":8,"long_text":"","short_text":"-"},{"line":9,"long_text":"","short_text":"-"},{"line":10,"long_text":"","short_text":"-"},{"line":11,"long_text":"","short_text":"-"},{"line":12,"long_text":"","short_text":"-"},{"line":13,"long_text":"","short_text":"-"},{"line":14,"long_text":"","short_text":"-"},{"line":15,"long_text":"","short_text":"-"},{"line":16,"long_text":"","short_text":"-"},{"line":17,"long_text":"","short_text":"-"},{"line":18,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":19,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":20,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":21,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":22,"long_text":"","short_text":"-"},{"line":23,"long_text":"","short_text":"-"},{"line":24,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":25,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":26,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":27,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":28,"long_text":"","short_text":"-"},{"line":29,"long_text":"","short_text":"-"},{"line":30,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":31,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":32,"long_text":"","short_text":"1","background_color":"0x35CC4B"},{"line":33,"long_text":"","short_text":"-"},{"line":34,"long_text":"","short_text":"-"}]}}
|
@@ -3,7 +3,11 @@ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
|
|
3
3
|
describe Slather::CoverageFile do
|
4
4
|
|
5
5
|
let(:fixtures_project) do
|
6
|
-
Slather::Project.open(FIXTURES_PROJECT_PATH)
|
6
|
+
project = Slather::Project.open(FIXTURES_PROJECT_PATH)
|
7
|
+
project.build_directory = TEMP_DERIVED_DATA_PATH
|
8
|
+
project.send(:configure)
|
9
|
+
project.stub(:input_format).and_return("gcov")
|
10
|
+
project
|
7
11
|
end
|
8
12
|
|
9
13
|
let(:coverage_file) do
|
@@ -109,12 +113,16 @@ OBJC
|
|
109
113
|
|
110
114
|
describe "gcov_data" do
|
111
115
|
it "should process the gcno file with gcov and return the contents of the file" do
|
112
|
-
expect(coverage_file.gcov_data).to include("
|
116
|
+
expect(coverage_file.gcov_data).to include(": 15: NSLog(@\"tested\");")
|
113
117
|
end
|
114
118
|
end
|
115
119
|
|
116
120
|
describe "line coverage" do
|
117
121
|
|
122
|
+
before(:each) {
|
123
|
+
fixtures_project.stub(:input_format).and_return("gcov")
|
124
|
+
}
|
125
|
+
|
118
126
|
let(:line_coverage_file) do
|
119
127
|
fixtures_project.send(:coverage_files).detect { |cf| cf.source_file_pathname.basename.to_s == "fixtures.m" }
|
120
128
|
end
|
@@ -133,13 +141,13 @@ OBJC
|
|
133
141
|
|
134
142
|
describe "num_lines_tested" do
|
135
143
|
it "should return the correct number of lines tested" do
|
136
|
-
expect(line_coverage_file.num_lines_tested).to eq(
|
144
|
+
expect(line_coverage_file.num_lines_tested).to eq(3)
|
137
145
|
end
|
138
146
|
end
|
139
147
|
|
140
148
|
describe "num_lines_testable" do
|
141
149
|
it "should return the correct number of lines that are testable" do
|
142
|
-
expect(line_coverage_file.num_lines_testable).to eq(
|
150
|
+
expect(line_coverage_file.num_lines_testable).to eq(6)
|
143
151
|
end
|
144
152
|
end
|
145
153
|
|
@@ -172,17 +180,17 @@ OBJC
|
|
172
180
|
it "should store an array for each line number which contains the hit count for each branch" do
|
173
181
|
data = branch_coverage_file.branch_coverage_data[15]
|
174
182
|
expect(data.length).to eq(2)
|
175
|
-
expect(data[0]).to
|
176
|
-
expect(data[1]).to
|
183
|
+
expect(data[0]).to be >= 1
|
184
|
+
expect(data[1]).to be >= 1
|
177
185
|
|
178
186
|
data = branch_coverage_file.branch_coverage_data[18]
|
179
187
|
expect(data.length).to eq(2)
|
180
188
|
expect(data[0]).to eq(0)
|
181
|
-
expect(data[1]).to
|
189
|
+
expect(data[1]).to be >= 1
|
182
190
|
|
183
191
|
data = branch_coverage_file.branch_coverage_data[26]
|
184
192
|
expect(data.length).to eq(2)
|
185
|
-
expect(data[0]).to
|
193
|
+
expect(data[0]).to be >= 2
|
186
194
|
expect(data[1]).to eq(0)
|
187
195
|
|
188
196
|
data = branch_coverage_file.branch_coverage_data[29]
|
@@ -198,17 +206,17 @@ OBJC
|
|
198
206
|
it "return the array with branch hit counts for statement at a given line number" do
|
199
207
|
data = branch_coverage_file.branch_coverage_data[15]
|
200
208
|
expect(data.length).to eq(2)
|
201
|
-
expect(data[0]).to
|
202
|
-
expect(data[1]).to
|
209
|
+
expect(data[0]).to be >= 1
|
210
|
+
expect(data[1]).to be >= 1
|
203
211
|
|
204
212
|
data = branch_coverage_file.branch_coverage_data[18]
|
205
213
|
expect(data.length).to eq(2)
|
206
214
|
expect(data[0]).to eq(0)
|
207
|
-
expect(data[1]).to
|
215
|
+
expect(data[1]).to be >= 1
|
208
216
|
|
209
217
|
data = branch_coverage_file.branch_coverage_data[26]
|
210
218
|
expect(data.length).to eq(2)
|
211
|
-
expect(data[0]).to
|
219
|
+
expect(data[0]).to be >= 2
|
212
220
|
expect(data[1]).to eq(0)
|
213
221
|
|
214
222
|
data = branch_coverage_file.branch_coverage_data[29]
|