forked from pool/perl-Test-Number-Delta
Compare commits
10 Commits
170119c21f
...
970c1a2539
Author | SHA256 | Date | |
---|---|---|---|
970c1a2539 | |||
|
56ea50cbe1 | ||
c55722415b | |||
|
00ccffb186 | ||
|
33bf59a049 | ||
|
2413154718 | ||
|
c2396c4980 | ||
|
a3c0aa8a30 | ||
|
d8976a2233 | ||
|
0eb799f5a9 |
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9cd18d89bde4333f9f9b77668ef03e6e20d8ee5675c2ab1b216c7323419a320e
|
|
||||||
size 18586
|
|
3
Test-Number-Delta-1.06.tar.gz
Normal file
3
Test-Number-Delta-1.06.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:535430919e6fdf6ce55ff76e9892afccba3b7d4160db45f3ac43b0f92ffcd049
|
||||||
|
size 21077
|
20
cpanspec.yml
Normal file
20
cpanspec.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
#description_paragraphs: 3
|
||||||
|
#no_testing: broken upstream
|
||||||
|
#sources:
|
||||||
|
# - source1
|
||||||
|
# - source2
|
||||||
|
#patches:
|
||||||
|
# foo.patch: -p1
|
||||||
|
# bar.patch:
|
||||||
|
#preamble: |-
|
||||||
|
# BuildRequires: gcc-c++
|
||||||
|
#post_prep: |-
|
||||||
|
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||||
|
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||||
|
#post_install: |-
|
||||||
|
# sed on %{name}.files
|
||||||
|
#license: SUSE-NonFree
|
||||||
|
#skip_noarch: 1
|
||||||
|
#custom_build: -
|
||||||
|
#./Build build flags=%{?_smp_mflags} --myflag
|
@@ -1,3 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 23 05:56:41 UTC 2015 - coolo@suse.com
|
||||||
|
|
||||||
|
- extend version to 6 digits to avoid problems with > 1.034
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 14 20:53:21 UTC 2015 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 1.06
|
||||||
|
see /usr/share/doc/packages/perl-Test-Number-Delta/Changes
|
||||||
|
|
||||||
|
1.06 2014-11-25 07:09:08-05:00 America/New_York
|
||||||
|
|
||||||
|
[Fixed]
|
||||||
|
|
||||||
|
- Make 0 and 0 compare equal with a relative epsilon
|
||||||
|
|
||||||
|
[Documented]
|
||||||
|
|
||||||
|
- Added SEE ALSO with Number::Tolerant and Test::Deep::NumberTolerant
|
||||||
|
|
||||||
|
1.05 2014-11-24 11:08:11-05:00 America/New_York
|
||||||
|
|
||||||
|
[Fixed]
|
||||||
|
|
||||||
|
- relative comparison of array reference elements now works as intended
|
||||||
|
|
||||||
|
- diagnostics of delta_not_ok and delta_not_within clarified under
|
||||||
|
relative comparison
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 26 07:35:28 UTC 2013 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 1.04
|
||||||
|
- Modernized distribution metadata and licensing
|
||||||
|
- Distribution now managed with Dist::Zilla
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 17 16:12:26 UTC 2011 - coolo@novell.com
|
||||||
|
|
||||||
|
- buildrequire perl-macros
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 30 19:20:50 UTC 2010 - coolo@novell.com
|
Tue Nov 30 19:20:50 UTC 2010 - coolo@novell.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Test-Number-Delta (Version 1.03)
|
# spec file for package perl-Test-Number-Delta
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -15,55 +15,67 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
# norootforbuild
|
|
||||||
|
|
||||||
|
|
||||||
Name: perl-Test-Number-Delta
|
Name: perl-Test-Number-Delta
|
||||||
Version: 1.03
|
Version: 1.060000
|
||||||
Release: 1
|
Release: 0
|
||||||
|
%define cpan_version 1.06
|
||||||
|
Provides: perl(Test::Number::Delta) = 1.060000
|
||||||
|
%define cpan_name Test-Number-Delta
|
||||||
Summary: Compare the difference between numbers against a given tolerance
|
Summary: Compare the difference between numbers against a given tolerance
|
||||||
Source: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Test-Number-Delta-%{version}.tar.gz
|
License: Apache-2.0
|
||||||
Url: http://search.cpan.org/dist/Test-Number-Delta/
|
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
License: Perl License
|
Url: http://search.cpan.org/dist/Test-Number-Delta/
|
||||||
|
Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{cpan_version}.tar.gz
|
||||||
|
Source1: cpanspec.yml
|
||||||
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: perl
|
||||||
|
BuildRequires: perl-macros
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
BuildRequires: make perl
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
At some point or another, most programmers find they need to compare
|
At some point or another, most programmers find they need to compare
|
||||||
floating-point numbers for equality. The typical idiom is to test if the
|
floating-point numbers for equality. The typical idiom is to test if the
|
||||||
absolute value of the difference of the numbers is within a desired tolerance,
|
absolute value of the difference of the numbers is within a desired
|
||||||
usually called epsilon. This module provides such a function for use with
|
tolerance, usually called epsilon. This module provides such a function for
|
||||||
Test::Harness. Usage is similar to other test functions described in
|
use with the Test::More manpage. Usage is similar to other test functions
|
||||||
Test::More.
|
described in the Test::More manpage. Semantically, the 'delta_within'
|
||||||
|
function replaces this kind of construct:
|
||||||
|
|
||||||
|
ok ( abs($p - $q) < $epsilon, '$p is equal to $q' ) or
|
||||||
|
diag "$p is not equal to $q to within $epsilon";
|
||||||
|
|
||||||
|
While there's nothing wrong with that construct, it's painful to type it
|
||||||
|
repeatedly in a test script. This module does the same thing with a single
|
||||||
|
function call. The 'delta_ok' function is similar, but either uses a global
|
||||||
|
default value for epsilon or else calculates a 'relative' epsilon on the
|
||||||
|
fly so that epsilon is scaled automatically to the size of the arguments to
|
||||||
|
'delta_ok'. Both functions are exported automatically.
|
||||||
|
|
||||||
|
Because checking floating-point equality is not always reliable, it is not
|
||||||
|
possible to check the 'equal to' boundary of 'less than or equal to
|
||||||
|
epsilon'. Therefore, Test::Number::Delta only compares if the absolute
|
||||||
|
value of the difference is *less than* epsilon (for equality tests) or
|
||||||
|
*greater than* epsilon (for inequality tests).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n "Test-Number-Delta-%{version}"
|
%setup -q -n %{cpan_name}-%{cpan_version}
|
||||||
%__sed -i '/^auto_install/d' Makefile.PL
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%__perl Makefile.PL PREFIX="%{_prefix}"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
%__make %{?jobs:-j%{jobs}}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{__make} test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
|
%perl_gen_filelist
|
||||||
|
|
||||||
%check
|
%files -f %{name}.files
|
||||||
%__make test
|
%defattr(-,root,root,755)
|
||||||
|
%doc Changes CONTRIBUTING.mkdn LICENSE README
|
||||||
|
|
||||||
%clean
|
|
||||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc Changes README
|
|
||||||
%dir %{perl_vendorlib}/Test
|
|
||||||
%dir %{perl_vendorlib}/Test/Number
|
|
||||||
%{perl_vendorlib}/Test/Number/Delta.pm
|
|
||||||
%dir %{perl_vendorarch}/auto/Test
|
|
||||||
%dir %{perl_vendorarch}/auto/Test/Number
|
|
||||||
%{perl_vendorarch}/auto/Test/Number/Delta
|
|
||||||
%doc %{perl_man3dir}/Test::Number::Delta.%{perl_man3ext}%{ext_man}
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user