File: api-coverage.t

package info (click to toggle)
libmemcached-libmemcached-perl 1.001801%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: perl: 1,677; makefile: 22
file content (29 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (4)
1
2
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
use strict;
use warnings;
use Test::More;

# t/pod-coverage shows what's been implemented but not documented
# t/api-coverage shows what's in the libmemcached API but not documented

use Memcached::libmemcached::API;

my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing" if $@;
plan tests => 1;

my $pc = Pod::Coverage->new(package => 'Memcached::libmemcached');
my %covered = map { $_=>1 } $pc->covered;

my @todo;
print "libmemcached_functions:\n";
for my $func (libmemcached_functions()) {
    print "$func\n";
    push @todo, $func unless $covered{$func};
}
if (@todo) {
    warn "  ".scalar(@todo)." Functions not yet implemented and documented:\n";
    warn "\t$_\n" for @todo;
}

pass; # don't treat as a failure