Permalink
Browse files

import Devel::Cover 0.23

  • Loading branch information...
1 parent e69ccba commit ffe2236dd90b16ae2cf915332422ded882b738f9 @pjcj committed Nov 3, 2004
Showing with 3,740 additions and 2,956 deletions.
  1. +16 −0 BUGS
  2. +8 −3 CHANGES
  3. +16 −8 Cover.xs
  4. +1 −0 MANIFEST
  5. +11 −13 Makefile.PL
  6. +7 −7 README
  7. +10 −2 TODO
  8. +4 −3 cover
  9. +5 −5 cpancover
  10. +2 −2 create_gold
  11. +3 −3 gcov2perl
  12. +112 −53 lib/Devel/Cover.pm
  13. +2 −2 lib/Devel/Cover/Branch.pm
  14. +2 −2 lib/Devel/Cover/Condition.pm
  15. +2 −2 lib/Devel/Cover/Condition_and_3.pm
  16. +2 −2 lib/Devel/Cover/Condition_or_2.pm
  17. +2 −2 lib/Devel/Cover/Condition_or_3.pm
  18. +2 −2 lib/Devel/Cover/Condition_xor_4.pm
  19. +13 −12 lib/Devel/Cover/Criterion.pm
  20. +8 −6 lib/Devel/Cover/DB.pm
  21. +3 −3 lib/Devel/Cover/DB/File.pm
  22. +1 −1 lib/Devel/Cover/Op.pm
  23. +2 −2 lib/Devel/Cover/Pod.pm
  24. +3 −3 lib/Devel/Cover/Report/Html.pm
  25. +5 −5 lib/Devel/Cover/Report/Html_basic.pm
  26. +98 −9 lib/Devel/Cover/Report/Html_subtle.pm
  27. +53 −6 lib/Devel/Cover/Report/Text.pm
  28. +2 −2 lib/Devel/Cover/Report/Text2.pm
  29. +2 −2 lib/Devel/Cover/Statement.pm
  30. +83 −0 lib/Devel/Cover/Subroutine.pm
  31. +5 −4 lib/Devel/Cover/Test.pm
  32. +2 −2 lib/Devel/Cover/Time.pm
  33. +2 −2 lib/Devel/Cover/Truth_Table.pm
  34. +1 −1 lib/Devel/Cover/Tutorial.pod
  35. +76 −68 test_output/cover/cond_and.5.006001
  36. +76 −68 test_output/cover/cond_and.5.008
  37. +74 −66 test_output/cover/cond_and.5.008001
  38. +327 −288 test_output/cover/cond_branch.5.006001
  39. +327 −288 test_output/cover/cond_branch.5.008
  40. +301 −262 test_output/cover/cond_branch.5.008001
  41. +64 −64 test_output/cover/cond_or.5.006001
  42. +64 −64 test_output/cover/cond_or.5.008
  43. +62 −62 test_output/cover/cond_or.5.008001
  44. +36 −36 test_output/cover/cond_xor.5.006001
  45. +36 −36 test_output/cover/cond_xor.5.008
  46. +34 −34 test_output/cover/cond_xor.5.008001
  47. +40 −31 test_output/cover/destroy.5.006001
  48. +40 −31 test_output/cover/destroy.5.008
  49. +40 −31 test_output/cover/destroy.5.008001
  50. +42 −34 test_output/cover/eval1.5.006001
  51. +42 −34 test_output/cover/eval1.5.008
  52. +42 −34 test_output/cover/eval1.5.008001
  53. +109 −84 test_output/cover/module1.5.006001
  54. +109 −84 test_output/cover/module1.5.008
  55. +108 −83 test_output/cover/module1.5.008001
  56. +109 −84 test_output/cover/module2.5.006001
  57. +109 −84 test_output/cover/module2.5.008
  58. +108 −83 test_output/cover/module2.5.008001
  59. +30 −22 test_output/cover/module_import.5.006001
  60. +44 −36 test_output/cover/module_import.5.008
  61. +30 −22 test_output/cover/module_import.5.008001
  62. +43 −33 test_output/cover/overloaded.5.006001
  63. +43 −33 test_output/cover/overloaded.5.008
  64. +43 −33 test_output/cover/overloaded.5.008001
  65. +42 −42 test_output/cover/special_blocks.5.006001
  66. +42 −42 test_output/cover/special_blocks.5.008
  67. +42 −42 test_output/cover/special_blocks.5.008001
  68. +20 −20 test_output/cover/statement.5.006001
  69. +20 −20 test_output/cover/statement.5.008
  70. +20 −20 test_output/cover/statement.5.008001
  71. +53 −53 test_output/cover/t0.5.006001
  72. +53 −53 test_output/cover/t0.5.008
  73. +51 −51 test_output/cover/t0.5.008001
  74. +35 −27 test_output/cover/t1.5.006001
  75. +35 −27 test_output/cover/t1.5.008
  76. +35 −27 test_output/cover/t1.5.008001
  77. +58 −50 test_output/cover/t2.5.006001
  78. +58 −50 test_output/cover/t2.5.008
  79. +56 −48 test_output/cover/t2.5.008001
  80. +22 −1 tests/cond_branch
View
16 BUGS
@@ -1,2 +1,18 @@
- Code in BEGIN and END blocks is not reported.
+
- Doesn't play nicely with all of Perl's testsuite.
+
+- elsif and else coverage is reported on the same line as the if
+ statement. This is because perl doesn't store the line number for the
+ elsif and elses. For the same reason the following warning is
+ reported on line 1 rather than line 2:
+
+ perl -we 'if ($a) {}
+ elsif ($a + 1) {}'
+ Use of uninitialized value in addition (+) at -e line 1.
+
+- Pod coverage only report data for modules, not top level scripts.
+ This is a limitation in Pod::Coverage.
+
+- Pod coverage does not work well with source filters including Switch.
+ Line numbers are reported incorrectly.
View
11 CHANGES
@@ -131,6 +131,11 @@ Release 0.21 - 1st September 2003
- Change some B::Deparse logic to mirror changes in 5.8.1/5.10.
Release 0.22 - 2nd September 2003
- - Rewrite runops function
- - First line of DESTROY blocks and overload subs not now skipped
- - Add some more tests
+ - Rewrite runops function.
+ - First line of DESTROY blocks and overload subs not now skipped.
+ - Add some more tests.
+
+Release 0.23 - 6th September 2003
+ - Report condition coverage for branches on the same line as the branch.
+ - Add subroutine coverage.
+ - Made "all" coverage value work and made it the default.
View
@@ -32,14 +32,15 @@ extern "C" {
#define L Perl_debug_log
#define svdump(sv) do_sv_dump(0, L, (SV *)sv, 0, 10, 1, 0);
-#define None 0x00000000
-#define Statement 0x00000001
-#define Branch 0x00000002
-#define Condition 0x00000004
-#define Path 0x00000008
-#define Pod 0x00000010
-#define Time 0x00000020
-#define All 0xffffffff
+#define None 0x00000000
+#define Statement 0x00000001
+#define Branch 0x00000002
+#define Condition 0x00000004
+#define Subroutine 0x00000008
+#define Path 0x00000010
+#define Pod 0x00000020
+#define Time 0x00000040
+#define All 0xffffffff
static unsigned Covering = All; /* Until we find out what we really want */
@@ -699,6 +700,13 @@ coverage_condition()
RETVAL
unsigned
+coverage_subroutine()
+ CODE:
+ RETVAL = Subroutine;
+ OUTPUT:
+ RETVAL
+
+unsigned
coverage_path()
CODE:
RETVAL = Path;
View
@@ -16,6 +16,7 @@ lib/Devel/Cover/Condition_or_2.pm
lib/Devel/Cover/Condition_or_3.pm
lib/Devel/Cover/Condition_and_3.pm
lib/Devel/Cover/Condition_xor_4.pm
+lib/Devel/Cover/Subroutine.pm
lib/Devel/Cover/Pod.pm
lib/Devel/Cover/Time.pm
lib/Devel/Cover/DB/File.pm
View
@@ -19,8 +19,8 @@ use ExtUtils::Manifest "maniread";
$| = 1;
-my $Version = "0.22";
-my $Date = "2nd September 2003";
+my $Version = "0.23";
+my $Date = "6th September 2003";
my $Author = 'pjcj@cpan.org';
my @perlbug = ("perlbug", "-a", $Author,
@@ -171,7 +171,7 @@ WriteMakefile
DIR => [],
EXE_FILES => [ "cover", "gcov2perl" ],
dist => { COMPRESS => "gzip --best --force" },
- clean => { FILES => join " ", map { "$_.version" } @versions },
+ clean => { FILES => join " ", "t/*", map "$_.version", @versions },
realclean => { FILES => "lib/Devel/Cover/Inc.pm cover_db t" },
depend => { distdir => "@files" },
);
@@ -238,18 +238,16 @@ ppm : ppd pure_all
-e 's/(CODEBASE HREF=")[^"]*/\$\$1Gedcom.tar.gz/;' \\
Devel-Cover.ppd
-run : pure_all
-\t \$(PERL) -Mblib -MDevel::Cover=-ignore,blib,-merge,0 tests/\$(TEST) && \\
+_run : pure_all
+\t \$(PERL) -Mblib -MDevel::Cover=-ignore,blib,-merge,0,`\$(PERL) -e 'qx|grep __COVER__ \$\$ARGV[0]| =~ /__COVER__\\s+criteria\\s+(.*)/; (\$\$c = \$\$1 || "all") =~ s/\\s+/,/g; print "-coverage,\$\$c"' tests/\$(TEST)` tests/\$(TEST) && \\
\$(PERL) -Mblib cover -report text \\
- > \$(TEST).out && \\
- gvim -d -geom 88x60+104+0 \$(TEST).out
+ > \$(TEST).out
-diff : pure_all
-\t \$(PERL) -Mblib -MDevel::Cover=-ignore,blib,-merge,0 tests/\$(TEST) && \\
- \$(PERL) -Mblib cover -report text \\
- -coverage statement -coverage branch -coverage condition \\
- > \$(TEST).out && \\
- gvim -d -geom 185x83+0+0 -font 8x13 \\
+run : _run
+\t gvim -d -geom 88x60+104+0 \$(TEST).out
+
+diff : _run
+\t gvim -d -geom 185x83+0+0 -font 8x13 \\
test_output/cover/\$(TEST).$test_version \$(TEST).out
gold : pure_all
View
14 README
@@ -13,13 +13,13 @@ DESCRIPTION
The cover program can be used to generate coverage reports.
- Statement, branch, condition, pod and time coverage information is
- reported. Statement coverage data should be reasonable, although there
- may be some statements which are not reported. Branch and condition
- coverage data should be mostly accurate too. These data should be mostly
- accurate, although not always what one might initially expect. Pod
- coverage comes from Pod::Coverage. Coverage data for path coverage are
- not yet collected.
+ Statement, branch, condition, subroutine, pod and time coverage
+ information is reported. Statement coverage data should be reasonable,
+ although there may be some statements which are not reported. Branch and
+ condition coverage data should be mostly accurate too, although not
+ always what one might initially expect. Subroutine coverage should be as
+ accurate as statements coverage. Pod coverage comes from Pod::Coverage.
+ Coverage data for path coverage are not yet collected.
The gcov2perl program can be used to convert gcov files to Devel::Cover
databases.
View
12 TODO
@@ -11,5 +11,13 @@
- See if the XS code leaks, and fix it if it does.
- Specify where html output goes.
- Different criteria for different runs.
-- Subroutine coverage
-- Improve textual output
+- Improve textual output.
+- Add platform and version info to DB.
+- Refactor output routines to use common template data.
+- Add popups to html output to specify x/y = z% (or some other way)
+- Look at time coverage again - collecting for too many ops?
+- MD5 file and check it hasn't changed.
+- Add -blib option defaulting on if blib directory is present.
+- Make path to DB absolute based on cwd.
+- Merge data from dynamically created subs.
+- Separate output for pod coverage, like subroutine coverage.
View
7 cover
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.22";
+our $VERSION = "0.23";
-use Devel::Cover::DB 0.22;
+use Devel::Cover::DB 0.23;
use Getopt::Long;
@@ -133,6 +133,7 @@ cover - report coverage statistics
cover -help -info -version -summary
-report report_format -option option
-file filename -coverage criterion -write [db]
+ -delete
coverage_database [coverage_database ...]
=head1 DESCRIPTION
@@ -201,7 +202,7 @@ See the BUGS file.
=head1 VERSION
-Version 0.22 - 2nd September 2003
+Version 0.23 - 6th September 2003
=head1 LICENCE
View
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.22";
+our $VERSION = "0.23";
-use Devel::Cover::DB 0.22;
+use Devel::Cover::DB 0.23;
use Cwd ();
use File::Find ();
@@ -310,7 +310,7 @@ package Devel::Cover::Cpancover::Template::Provider;
use strict;
use warnings;
-our $VERSION = "0.22";
+our $VERSION = "0.23";
use base "Template::Provider";
@@ -346,7 +346,7 @@ $Templates{html} = <<'EOT';
<!--
-This file was generated by Devel::Cover Version 0.22
+This file was generated by Devel::Cover Version 0.23
Devel::Cover is copyright 2001-2003, Paul Johnson (pjcj@cpan.org)
@@ -454,7 +454,7 @@ The following exit values are returned:
=head1 VERSION
-Version 0.22 - 2nd September 2003
+Version 0.23 - 6th September 2003
=head1 LICENCE
View
@@ -12,11 +12,11 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.22";
+our $VERSION = "0.23";
use blib;
-use Devel::Cover::Test 0.22;
+use Devel::Cover::Test 0.23;
my @tests = @ARGV;
View
@@ -12,9 +12,9 @@ require 5.6.1;
use strict;
use warnings;
-our $VERSION = "0.22";
+our $VERSION = "0.23";
-use Devel::Cover::DB 0.22;
+use Devel::Cover::DB 0.23;
use Getopt::Long;
use Pod::Usage;
@@ -128,7 +128,7 @@ Huh?
=head1 VERSION
-Version 0.22 - 2nd September 2003
+Version 0.23 - 6th September 2003
=head1 LICENCE
Oops, something went wrong.

0 comments on commit ffe2236

Please sign in to comment.