rcov 0.9.11 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/bin/rcov +26 -3
  2. data/ext/rcovrt/1.8/callsite.c +38 -53
  3. data/ext/rcovrt/1.8/rcovrt.c +84 -100
  4. data/ext/rcovrt/extconf.rb +7 -12
  5. data/lib/rcov/formatters/html_erb_template.rb +7 -7
  6. data/lib/rcov/formatters/html_profiling.rb +51 -0
  7. data/lib/rcov/formatters/ruby_annotation.rb +110 -0
  8. data/lib/rcov/templates/index.html.erb +18 -14
  9. data/lib/rcov/version.rb +2 -6
  10. metadata +35 -75
  11. data/BLURB +0 -111
  12. data/LICENSE +0 -53
  13. data/Rakefile +0 -103
  14. data/THANKS +0 -110
  15. data/doc/readme_for_api.markdown +0 -22
  16. data/doc/readme_for_emacs.markdown +0 -52
  17. data/doc/readme_for_rake.markdown +0 -51
  18. data/doc/readme_for_vim.markdown +0 -34
  19. data/editor-extensions/rcov.el +0 -131
  20. data/editor-extensions/rcov.vim +0 -38
  21. data/ext/rcovrt/1.9/callsite.c +0 -234
  22. data/ext/rcovrt/1.9/rcovrt.c +0 -264
  23. data/setup.rb +0 -1588
  24. data/test/assets/sample_01.rb +0 -7
  25. data/test/assets/sample_02.rb +0 -5
  26. data/test/assets/sample_03.rb +0 -20
  27. data/test/assets/sample_04.rb +0 -10
  28. data/test/assets/sample_05-new.rb +0 -17
  29. data/test/assets/sample_05-old.rb +0 -13
  30. data/test/assets/sample_05.rb +0 -17
  31. data/test/assets/sample_06.rb +0 -8
  32. data/test/call_site_analyzer_test.rb +0 -171
  33. data/test/code_coverage_analyzer_test.rb +0 -220
  34. data/test/expected_coverage/diff-gcc-all.out +0 -7
  35. data/test/expected_coverage/diff-gcc-diff.out +0 -11
  36. data/test/expected_coverage/diff-gcc-original.out +0 -5
  37. data/test/expected_coverage/diff-no-color.out +0 -12
  38. data/test/expected_coverage/diff.out +0 -12
  39. data/test/expected_coverage/gcc-text.out +0 -10
  40. data/test/expected_coverage/sample_03_rb.html +0 -651
  41. data/test/expected_coverage/sample_03_rb.rb +0 -28
  42. data/test/expected_coverage/sample_04_rb.html +0 -641
  43. data/test/file_statistics_test.rb +0 -471
  44. data/test/functional_test.rb +0 -91
  45. data/test/test_helper.rb +0 -4
  46. data/test/turn_off_rcovrt.rb +0 -4
@@ -1,7 +0,0 @@
1
- ================================================================================
2
- assets/sample_05.rb
3
- ================================================================================
4
- assets/sample_05.rb:2: 4*x
5
- assets/sample_05.rb:3:end
6
- assets/sample_05.rb:14: 3*x
7
- assets/sample_05.rb:15:end
@@ -1,11 +0,0 @@
1
-
2
- ================================================================================
3
- !!!!! Uncovered code introduced in assets/sample_05.rb
4
-
5
- assets/sample_05.rb-1-def d(x)
6
- assets/sample_05.rb:2: 4*x
7
- assets/sample_05.rb:3:end
8
- assets/sample_05.rb-4-
9
- assets/sample_05.rb-5-def a
10
- assets/sample_05.rb-6- b 10
11
- assets/sample_05.rb-7-end
@@ -1,5 +0,0 @@
1
- ================================================================================
2
- assets/sample_05.rb
3
- ================================================================================
4
- assets/sample_05.rb:10: 3*x
5
- assets/sample_05.rb:11:end
@@ -1,12 +0,0 @@
1
-
2
- ================================================================================
3
- !!!!! Uncovered code introduced in assets/sample_05.rb
4
-
5
- ### assets/sample_05.rb:1
6
- def d(x)
7
- !! 4*x
8
- !! end
9
-
10
- def a
11
- b 10
12
- end
@@ -1,12 +0,0 @@
1
-
2
- ================================================================================
3
- !!!!! Uncovered code introduced in assets/sample_05.rb
4
-
5
- ### assets/sample_05.rb:1
6
- def d(x)
7
-  4*x
8
- end
9
- 
10
- def a
11
-  b 10
12
- end
@@ -1,10 +0,0 @@
1
- ================================================================================
2
- assets/sample_03.rb
3
- ================================================================================
4
- assets/sample_03.rb:15: 10.times{ g2 }
5
- assets/sample_03.rb:16: end
6
- assets/sample_03.rb:19: # safe from here ...
7
- assets/sample_03.rb:20:end end end end
8
- ================================================================================
9
- assets/sample_04.rb
10
- ================================================================================
@@ -1,651 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
- <head>
4
- <title>sample_03.rb - C0 code coverage information</title>
5
- <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
6
- <style type='text/css'>span.cross-ref-title {
7
- font-size: 140%;
8
- }
9
- span.cross-ref a {
10
- text-decoration: none;
11
- }
12
- span.cross-ref {
13
- background-color:#f3f7fa;
14
- border: 1px dashed #333;
15
- margin: 1em;
16
- padding: 0.5em;
17
- overflow: hidden;
18
- }
19
- a.crossref-toggle {
20
- text-decoration: none;
21
- }
22
- span.marked0 {
23
- background-color: rgb(185, 210, 200);
24
- display: block;
25
- }
26
- span.marked1 {
27
- background-color: rgb(190, 215, 205);
28
- display: block;
29
- }
30
- span.inferred0 {
31
- background-color: rgb(175, 200, 200);
32
- display: block;
33
- }
34
- span.inferred1 {
35
- background-color: rgb(180, 205, 205);
36
- display: block;
37
- }
38
- span.uncovered0 {
39
- background-color: rgb(225, 110, 110);
40
- display: block;
41
- }
42
- span.uncovered1 {
43
- background-color: rgb(235, 120, 120);
44
- display: block;
45
- }
46
- span.overview {
47
- border-bottom: 8px solid black;
48
- }
49
- div.overview {
50
- border-bottom: 8px solid black;
51
- }
52
- body {
53
- font-family: verdana, arial, helvetica;
54
- }
55
- div.footer {
56
- font-size: 68%;
57
- margin-top: 1.5em;
58
- }
59
- h1, h2, h3, h4, h5, h6 {
60
- margin-bottom: 0.5em;
61
- }
62
- h5 {
63
- margin-top: 0.5em;
64
- }
65
- .hidden {
66
- display: none;
67
- }
68
- div.separator {
69
- height: 10px;
70
- }
71
- /* Commented out for better readability, esp. on IE */
72
- /*
73
- table tr td, table tr th {
74
- font-size: 68%;
75
- }
76
- td.value table tr td {
77
- font-size: 11px;
78
- }
79
- */
80
- table.percent_graph {
81
- height: 12px;
82
- border: #808080 1px solid;
83
- empty-cells: show;
84
- }
85
- table.percent_graph td.covered {
86
- height: 10px;
87
- background: #00f000;
88
- }
89
- table.percent_graph td.uncovered {
90
- height: 10px;
91
- background: #e00000;
92
- }
93
- table.percent_graph td.NA {
94
- height: 10px;
95
- background: #eaeaea;
96
- }
97
- table.report {
98
- border-collapse: collapse;
99
- width: 100%;
100
- }
101
- table.report td.heading {
102
- background: #dcecff;
103
- border: #d0d0d0 1px solid;
104
- font-weight: bold;
105
- text-align: center;
106
- }
107
- table.report td.heading:hover {
108
- background: #c0ffc0;
109
- }
110
- table.report td.text {
111
- border: #d0d0d0 1px solid;
112
- }
113
- table.report td.value,
114
- table.report td.lines_total,
115
- table.report td.lines_code {
116
- text-align: right;
117
- border: #d0d0d0 1px solid;
118
- }
119
- table.report tr.light {
120
- background-color: rgb(240, 240, 245);
121
- }
122
- table.report tr.dark {
123
- background-color: rgb(230, 230, 235);
124
- }
125
- </style>
126
- <script type='text/javascript'>
127
- // <![CDATA[
128
- function toggleCode( id ) {
129
- if ( document.getElementById )
130
- elem = document.getElementById( id );
131
- else if ( document.all )
132
- elem = eval( "document.all." + id );
133
- else
134
- return false;
135
-
136
- elemStyle = elem.style;
137
-
138
- if ( elemStyle.display != "block" ) {
139
- elemStyle.display = "block"
140
- } else {
141
- elemStyle.display = "none"
142
- }
143
-
144
- return true;
145
- }
146
-
147
- // Make cross-references hidden by default
148
- document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" )
149
- // ]]>
150
- </script>
151
- <style type='text/css'>span.run0 {
152
- background-color: rgb(178, 204, 255);
153
- display: block;
154
- }
155
- span.run1 {
156
- background-color: rgb(178, 206, 255);
157
- display: block;
158
- }
159
- span.run2 {
160
- background-color: rgb(178, 209, 255);
161
- display: block;
162
- }
163
- span.run3 {
164
- background-color: rgb(178, 211, 255);
165
- display: block;
166
- }
167
- span.run4 {
168
- background-color: rgb(178, 214, 255);
169
- display: block;
170
- }
171
- span.run5 {
172
- background-color: rgb(178, 218, 255);
173
- display: block;
174
- }
175
- span.run6 {
176
- background-color: rgb(178, 220, 255);
177
- display: block;
178
- }
179
- span.run7 {
180
- background-color: rgb(178, 223, 255);
181
- display: block;
182
- }
183
- span.run8 {
184
- background-color: rgb(178, 225, 255);
185
- display: block;
186
- }
187
- span.run9 {
188
- background-color: rgb(178, 228, 255);
189
- display: block;
190
- }
191
- span.run10 {
192
- background-color: rgb(178, 232, 255);
193
- display: block;
194
- }
195
- span.run11 {
196
- background-color: rgb(178, 234, 255);
197
- display: block;
198
- }
199
- span.run12 {
200
- background-color: rgb(178, 237, 255);
201
- display: block;
202
- }
203
- span.run13 {
204
- background-color: rgb(178, 239, 255);
205
- display: block;
206
- }
207
- span.run14 {
208
- background-color: rgb(178, 242, 255);
209
- display: block;
210
- }
211
- span.run15 {
212
- background-color: rgb(178, 246, 255);
213
- display: block;
214
- }
215
- span.run16 {
216
- background-color: rgb(178, 248, 255);
217
- display: block;
218
- }
219
- span.run17 {
220
- background-color: rgb(178, 251, 255);
221
- display: block;
222
- }
223
- span.run18 {
224
- background-color: rgb(178, 253, 255);
225
- display: block;
226
- }
227
- span.run19 {
228
- background-color: rgb(178, 255, 253);
229
- display: block;
230
- }
231
- span.run20 {
232
- background-color: rgb(178, 255, 249);
233
- display: block;
234
- }
235
- span.run21 {
236
- background-color: rgb(178, 255, 247);
237
- display: block;
238
- }
239
- span.run22 {
240
- background-color: rgb(178, 255, 244);
241
- display: block;
242
- }
243
- span.run23 {
244
- background-color: rgb(178, 255, 242);
245
- display: block;
246
- }
247
- span.run24 {
248
- background-color: rgb(178, 255, 239);
249
- display: block;
250
- }
251
- span.run25 {
252
- background-color: rgb(178, 255, 235);
253
- display: block;
254
- }
255
- span.run26 {
256
- background-color: rgb(178, 255, 233);
257
- display: block;
258
- }
259
- span.run27 {
260
- background-color: rgb(178, 255, 230);
261
- display: block;
262
- }
263
- span.run28 {
264
- background-color: rgb(178, 255, 228);
265
- display: block;
266
- }
267
- span.run29 {
268
- background-color: rgb(178, 255, 225);
269
- display: block;
270
- }
271
- span.run30 {
272
- background-color: rgb(178, 255, 221);
273
- display: block;
274
- }
275
- span.run31 {
276
- background-color: rgb(178, 255, 219);
277
- display: block;
278
- }
279
- span.run32 {
280
- background-color: rgb(178, 255, 216);
281
- display: block;
282
- }
283
- span.run33 {
284
- background-color: rgb(178, 255, 214);
285
- display: block;
286
- }
287
- span.run34 {
288
- background-color: rgb(178, 255, 211);
289
- display: block;
290
- }
291
- span.run35 {
292
- background-color: rgb(178, 255, 207);
293
- display: block;
294
- }
295
- span.run36 {
296
- background-color: rgb(178, 255, 205);
297
- display: block;
298
- }
299
- span.run37 {
300
- background-color: rgb(178, 255, 202);
301
- display: block;
302
- }
303
- span.run38 {
304
- background-color: rgb(178, 255, 200);
305
- display: block;
306
- }
307
- span.run39 {
308
- background-color: rgb(178, 255, 197);
309
- display: block;
310
- }
311
- span.run40 {
312
- background-color: rgb(178, 255, 193);
313
- display: block;
314
- }
315
- span.run41 {
316
- background-color: rgb(178, 255, 191);
317
- display: block;
318
- }
319
- span.run42 {
320
- background-color: rgb(178, 255, 188);
321
- display: block;
322
- }
323
- span.run43 {
324
- background-color: rgb(178, 255, 186);
325
- display: block;
326
- }
327
- span.run44 {
328
- background-color: rgb(178, 255, 183);
329
- display: block;
330
- }
331
- span.run45 {
332
- background-color: rgb(178, 255, 179);
333
- display: block;
334
- }
335
- span.run46 {
336
- background-color: rgb(179, 255, 178);
337
- display: block;
338
- }
339
- span.run47 {
340
- background-color: rgb(182, 255, 178);
341
- display: block;
342
- }
343
- span.run48 {
344
- background-color: rgb(184, 255, 178);
345
- display: block;
346
- }
347
- span.run49 {
348
- background-color: rgb(187, 255, 178);
349
- display: block;
350
- }
351
- span.run50 {
352
- background-color: rgb(191, 255, 178);
353
- display: block;
354
- }
355
- span.run51 {
356
- background-color: rgb(193, 255, 178);
357
- display: block;
358
- }
359
- span.run52 {
360
- background-color: rgb(196, 255, 178);
361
- display: block;
362
- }
363
- span.run53 {
364
- background-color: rgb(198, 255, 178);
365
- display: block;
366
- }
367
- span.run54 {
368
- background-color: rgb(201, 255, 178);
369
- display: block;
370
- }
371
- span.run55 {
372
- background-color: rgb(205, 255, 178);
373
- display: block;
374
- }
375
- span.run56 {
376
- background-color: rgb(207, 255, 178);
377
- display: block;
378
- }
379
- span.run57 {
380
- background-color: rgb(210, 255, 178);
381
- display: block;
382
- }
383
- span.run58 {
384
- background-color: rgb(212, 255, 178);
385
- display: block;
386
- }
387
- span.run59 {
388
- background-color: rgb(215, 255, 178);
389
- display: block;
390
- }
391
- span.run60 {
392
- background-color: rgb(219, 255, 178);
393
- display: block;
394
- }
395
- span.run61 {
396
- background-color: rgb(221, 255, 178);
397
- display: block;
398
- }
399
- span.run62 {
400
- background-color: rgb(224, 255, 178);
401
- display: block;
402
- }
403
- span.run63 {
404
- background-color: rgb(226, 255, 178);
405
- display: block;
406
- }
407
- span.run64 {
408
- background-color: rgb(229, 255, 178);
409
- display: block;
410
- }
411
- span.run65 {
412
- background-color: rgb(233, 255, 178);
413
- display: block;
414
- }
415
- span.run66 {
416
- background-color: rgb(235, 255, 178);
417
- display: block;
418
- }
419
- span.run67 {
420
- background-color: rgb(238, 255, 178);
421
- display: block;
422
- }
423
- span.run68 {
424
- background-color: rgb(240, 255, 178);
425
- display: block;
426
- }
427
- span.run69 {
428
- background-color: rgb(243, 255, 178);
429
- display: block;
430
- }
431
- span.run70 {
432
- background-color: rgb(247, 255, 178);
433
- display: block;
434
- }
435
- span.run71 {
436
- background-color: rgb(249, 255, 178);
437
- display: block;
438
- }
439
- span.run72 {
440
- background-color: rgb(252, 255, 178);
441
- display: block;
442
- }
443
- span.run73 {
444
- background-color: rgb(255, 255, 178);
445
- display: block;
446
- }
447
- span.run74 {
448
- background-color: rgb(255, 252, 178);
449
- display: block;
450
- }
451
- span.run75 {
452
- background-color: rgb(255, 248, 178);
453
- display: block;
454
- }
455
- span.run76 {
456
- background-color: rgb(255, 246, 178);
457
- display: block;
458
- }
459
- span.run77 {
460
- background-color: rgb(255, 243, 178);
461
- display: block;
462
- }
463
- span.run78 {
464
- background-color: rgb(255, 240, 178);
465
- display: block;
466
- }
467
- span.run79 {
468
- background-color: rgb(255, 238, 178);
469
- display: block;
470
- }
471
- span.run80 {
472
- background-color: rgb(255, 234, 178);
473
- display: block;
474
- }
475
- span.run81 {
476
- background-color: rgb(255, 232, 178);
477
- display: block;
478
- }
479
- span.run82 {
480
- background-color: rgb(255, 229, 178);
481
- display: block;
482
- }
483
- span.run83 {
484
- background-color: rgb(255, 226, 178);
485
- display: block;
486
- }
487
- span.run84 {
488
- background-color: rgb(255, 224, 178);
489
- display: block;
490
- }
491
- span.run85 {
492
- background-color: rgb(255, 220, 178);
493
- display: block;
494
- }
495
- span.run86 {
496
- background-color: rgb(255, 218, 178);
497
- display: block;
498
- }
499
- span.run87 {
500
- background-color: rgb(255, 215, 178);
501
- display: block;
502
- }
503
- span.run88 {
504
- background-color: rgb(255, 212, 178);
505
- display: block;
506
- }
507
- span.run89 {
508
- background-color: rgb(255, 210, 178);
509
- display: block;
510
- }
511
- span.run90 {
512
- background-color: rgb(255, 206, 178);
513
- display: block;
514
- }
515
- span.run91 {
516
- background-color: rgb(255, 204, 178);
517
- display: block;
518
- }
519
- span.run92 {
520
- background-color: rgb(255, 201, 178);
521
- display: block;
522
- }
523
- span.run93 {
524
- background-color: rgb(255, 198, 178);
525
- display: block;
526
- }
527
- span.run94 {
528
- background-color: rgb(255, 196, 178);
529
- display: block;
530
- }
531
- span.run95 {
532
- background-color: rgb(255, 192, 178);
533
- display: block;
534
- }
535
- span.run96 {
536
- background-color: rgb(255, 189, 178);
537
- display: block;
538
- }
539
- span.run97 {
540
- background-color: rgb(255, 187, 178);
541
- display: block;
542
- }
543
- span.run98 {
544
- background-color: rgb(255, 184, 178);
545
- display: block;
546
- }
547
- span.run99 {
548
- background-color: rgb(255, 182, 178);
549
- display: block;
550
- }
551
- span.run100 {
552
- background-color: rgb(255, 178, 178);
553
- display: block;
554
- }
555
- </style>
556
- </head>
557
- <body>
558
- <h3>C0 code coverage information</h3>
559
- <p>Generated on Sat, Dec 16 2006 23:09:02 +0900 with <a href='http://eigenclass.org/hiki.rb?rcov'>rcov 0.7.1</a>
560
- </p>
561
- <hr /><pre><span class='marked0'>Code reported as executed by Ruby looks like this...
562
- </span><span class='marked1'>and this: this line is also marked as covered.
563
- </span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this,
564
- </span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).
565
- </span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed.
566
- </span></pre>
567
- <table class='report'>
568
- <thead>
569
- <tr>
570
- <td class='heading'>Name</td>
571
- <td class='heading'>Total lines</td>
572
- <td class='heading'>Lines of code</td>
573
- <td class='heading'>Total coverage</td>
574
- <td class='heading'>Code coverage</td>
575
- </tr>
576
- </thead>
577
- <tbody>
578
- <tr class='light'>
579
- <td>
580
- <a href='sample_03_rb.html'>sample_03.rb</a>
581
- </td>
582
- <td class='lines_total'>
583
- <tt>20</tt>
584
- </td>
585
- <td class='lines_code'>
586
- <tt>14</tt>
587
- </td>
588
- <td>
589
- <table cellspacing='0' cellpadding='0' align='right'>
590
- <tr>
591
- <td>
592
- <tt class='coverage_total'>80.0%</tt>&nbsp;</td>
593
- <td>
594
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
595
- <tr>
596
- <td class='covered' width='80' />
597
- <td class='uncovered' width='20' />
598
- </tr>
599
- </table>
600
- </td>
601
- </tr>
602
- </table>
603
- </td>
604
- <td>
605
- <table cellspacing='0' cellpadding='0' align='right'>
606
- <tr>
607
- <td>
608
- <tt class='coverage_code'>78.6%</tt>&nbsp;</td>
609
- <td>
610
- <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
611
- <tr>
612
- <td class='covered' width='79' />
613
- <td class='uncovered' width='21' />
614
- </tr>
615
- </table>
616
- </td>
617
- </tr>
618
- </table>
619
- </td>
620
- </tr>
621
- </tbody>
622
- </table><pre><span class="inferred1"><a name="line1"></a> 1
623
- </span><span class="marked0"><a name="line2"></a> 2 module Rcov; module Test; module Temporary; class Sample03
624
- </span><span class="marked1"><a name="line3"></a> 3 def f1 # MUST NOT CHANGE the position or the tests will break
625
- </span><span class="marked0"><a name="line4"></a> 4 10.times { f2 }
626
- </span><span class="marked1"><a name="line5"></a> 5 end
627
- </span><span class="inferred0"><a name="line6"></a> 6
628
- </span><span class="marked1"><a name="line7"></a> 7 def f2; 1 end
629
- </span><span class="inferred0"><a name="line8"></a> 8
630
- </span><span class="marked1"><a name="line9"></a> 9 def f3
631
- </span><span class="marked0"><a name="line10"></a>10 10.times{ f1 }
632
- </span><span class="marked1"><a name="line11"></a>11 100.times{ f2 }
633
- </span><span class="inferred0"><a name="line12"></a>12 end
634
- </span><span class="inferred1"><a name="line13"></a>13
635
- </span><span class="marked0"><a name="line14"></a>14 def self.g1
636
- </span><span class="uncovered1"><a name="line15"></a>15 10.times{ g2 }
637
- </span><span class="uncovered0"><a name="line16"></a>16 end
638
- </span><span class="inferred1"><a name="line17"></a>17
639
- </span><span class="marked0"><a name="line18"></a>18 def self.g2; 1 end
640
- </span><span class="uncovered1"><a name="line19"></a>19 # safe from here ...
641
- </span><span class="uncovered0"><a name="line20"></a>20 end end end end
642
- </span></pre><hr /> <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a> version 0.8.0.</p><p>
643
- <a href='http://validator.w3.org/check/referer'>
644
- <img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88' />
645
- </a>
646
- <a href='http://jigsaw.w3.org/css-validator/check/referer'>
647
- <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px' />
648
- </a>
649
- </p>
650
- </body>
651
- </html>