r35092 - in /trunk/libstatistics-descriptive-perl: Build.PL Changes MANIFEST META.yml Makefile.PL debian/changelog inc/ lib/Statistics/Descriptive.pm t/descr.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Sat May 9 22:27:54 UTC 2009
Author: ryan52-guest
Date: Sat May 9 22:27:49 2009
New Revision: 35092
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35092
Log:
New upstream release
Added:
trunk/libstatistics-descriptive-perl/inc/
- copied from r35091, branches/upstream/libstatistics-descriptive-perl/current/inc/
Modified:
trunk/libstatistics-descriptive-perl/Build.PL
trunk/libstatistics-descriptive-perl/Changes
trunk/libstatistics-descriptive-perl/MANIFEST
trunk/libstatistics-descriptive-perl/META.yml
trunk/libstatistics-descriptive-perl/Makefile.PL
trunk/libstatistics-descriptive-perl/debian/changelog
trunk/libstatistics-descriptive-perl/lib/Statistics/Descriptive.pm
trunk/libstatistics-descriptive-perl/t/descr.t
Modified: trunk/libstatistics-descriptive-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/Build.PL?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/Build.PL (original)
+++ trunk/libstatistics-descriptive-perl/Build.PL Sat May 9 22:27:49 2009
@@ -1,14 +1,18 @@
use strict;
use warnings;
-use Module::Build;
-my $builder = Module::Build->new(
+use lib "./inc";
+
+use Test::Run::Builder;
+
+my $builder = Test::Run::Builder->new(
module_name => 'Statistics::Descriptive',
license => 'perl',
dist_author => 'Shlomi Fish <shlomif at iglu.org.il>',
dist_version_from => 'lib/Statistics/Descriptive.pm',
build_requires => {
'Benchmark' => 0,
+ 'lib' => 0,
'Test::More' => 0,
},
requires => {
Modified: trunk/libstatistics-descriptive-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/Changes?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/Changes (original)
+++ trunk/libstatistics-descriptive-perl/Changes Sat May 9 22:27:49 2009
@@ -1,4 +1,11 @@
Revision history for Perl extension Statistics::Descriptive.
+
+2.8 May 09, 2009
+
+ - Enabled "./Build runtest" and "./Build distruntest" (using Test::Run)
+ in the distribution.
+
+ - Fixed incomplete/broken tests in t/descr.t.
2.7 May 03, 2009
Modified: trunk/libstatistics-descriptive-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/MANIFEST?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/MANIFEST (original)
+++ trunk/libstatistics-descriptive-perl/MANIFEST Sat May 9 22:27:49 2009
@@ -1,5 +1,6 @@
Build.PL
Changes
+inc/Test/Run/Builder.pm
lib/Statistics/Descriptive.pm
Makefile.PL
MANIFEST
Modified: trunk/libstatistics-descriptive-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/META.yml?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/META.yml (original)
+++ trunk/libstatistics-descriptive-perl/META.yml Sat May 9 22:27:49 2009
@@ -1,6 +1,6 @@
---
name: Statistics-Descriptive
-version: 2.7
+version: 2.8
author:
- 'Shlomi Fish <shlomif at iglu.org.il>'
abstract: Module of basic descriptive statistical functions.
@@ -18,10 +18,11 @@
build_requires:
Benchmark: 0
Test::More: 0
+ lib: 0
provides:
Statistics::Descriptive:
file: lib/Statistics/Descriptive.pm
- version: 2.7
+ version: 2.8
Statistics::Descriptive::Full:
file: lib/Statistics/Descriptive.pm
Statistics::Descriptive::Sparse:
Modified: trunk/libstatistics-descriptive-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/Makefile.PL?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/Makefile.PL (original)
+++ trunk/libstatistics-descriptive-perl/Makefile.PL Sat May 9 22:27:49 2009
@@ -9,6 +9,7 @@
'Carp' => 0,
'POSIX' => 0,
'Test::More' => 0,
+ 'lib' => 0,
'strict' => 0,
'vars' => 0,
'warnings' => 0
Modified: trunk/libstatistics-descriptive-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/debian/changelog?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/debian/changelog (original)
+++ trunk/libstatistics-descriptive-perl/debian/changelog Sat May 9 22:27:49 2009
@@ -1,3 +1,9 @@
+libstatistics-descriptive-perl (2.8-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Ryan Niebur <ryanryan52 at gmail.com> Sat, 09 May 2009 15:27:39 -0700
+
libstatistics-descriptive-perl (2.7-1) unstable; urgency=low
[ gregor herrmann ]
Modified: trunk/libstatistics-descriptive-perl/lib/Statistics/Descriptive.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/lib/Statistics/Descriptive.pm?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/lib/Statistics/Descriptive.pm (original)
+++ trunk/libstatistics-descriptive-perl/lib/Statistics/Descriptive.pm Sat May 9 22:27:49 2009
@@ -10,7 +10,7 @@
##Perl5. 01-03 weren't bug free.
use vars (qw($VERSION $Tolerance));
-$VERSION = '2.7';
+$VERSION = '2.8';
$Tolerance = 0.0;
Modified: trunk/libstatistics-descriptive-perl/t/descr.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libstatistics-descriptive-perl/t/descr.t?rev=35092&op=diff
==============================================================================
--- trunk/libstatistics-descriptive-perl/t/descr.t (original)
+++ trunk/libstatistics-descriptive-perl/t/descr.t Sat May 9 22:27:49 2009
@@ -9,6 +9,58 @@
use Benchmark;
use Statistics::Descriptive;
+sub compare_hash_by_ranges
+{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
+ my $got_hash_ref = shift;
+ my $expected = shift;
+ my $blurb = shift;
+
+ my $got =
+ [
+ map { [$_, $got_hash_ref->{$_} ] }
+ sort { $a <=> $b }
+ keys(%$got_hash_ref)
+ ]
+ ;
+
+ my $success = 1;
+
+ if (scalar(@$expected) != scalar(@$got))
+ {
+ $success = 0;
+ diag("Number of keys differ in hashes.");
+ }
+ else
+ {
+ COMPARE_KEYS:
+ for my $idx (0 .. $#$got)
+ {
+ my ($got_key, $got_val) = @{$got->[$idx]};
+ my ($expected_bottom, $expected_top, $expected_val)
+ = @{$expected->[$idx]};
+
+ if (! ( ($got_key >= $expected_bottom)
+ && ($got_key <= $expected_top)
+ && ($got_val == $expected_val)
+ )
+ )
+ {
+ $success = 0;
+ diag(<<"EOF");
+Key/Val pair No. $idx is out of range or wrong:
+Got: [$got_key, $got_val]
+Expected: [$expected_bottom, $expected_top, $expected_val]
+EOF
+
+ last COMPARE_KEYS;
+ }
+ }
+ }
+
+ ok($success, $blurb);
+}
# print "1..14\n";
# test #1
@@ -73,6 +125,8 @@
ok (scalar(abs( $single_result - 1.6363 ) < 0.001),
"test normal function of harmonic mean",
);
+
+
# test #7
# test stringification of hash keys in frequency distribution
@@ -84,9 +138,10 @@
my %f = $stat->frequency_distribution(2);
# TEST
-ok ((($f{0.216666666666667} == 3) &&
- ($f{0.333333333333333} == 1)),
- "test stringification of hash keys in frequency distribution"
+compare_hash_by_ranges(
+ \%f,
+ [[0.216666,0.216667,3],[0.3333,0.3334,1]],
+ "Test stringification of hash keys in frequency distribution",
);
# test #8
@@ -116,14 +171,16 @@
%f = $stat->frequency_distribution(\@freq_bins);
# TEST
-ok (
- (($f{20} == 3) &&
- ($f{40} == 5) &&
- ($f{60} == 1) &&
- ($f{80} == 1) &&
- ($f{100} == 0)
- ),
- "test the frequency distribution with specified bins"
+is_deeply(
+ \%f,
+ {
+ 20 => 3,
+ 40 => 5,
+ 60 => 1,
+ 80 => 1,
+ 100 => 0,
+ },
+ "Test the frequency distribution with specified bins"
);
# test #10 and #11
More information about the Pkg-perl-cvs-commits
mailing list