3 %bcond_without tests # do not perform "make test"
6 %define pnam Number-Delta
7 Summary: Test::Number::Delta - Compare the difference between numbers agains given tolerance
8 Summary(pl.UTF-8): Test::Number::Delta - porównywanie różnicy między liczbami do podanej tolerancji
9 Name: perl-Test-Number-Delta
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: f0d420e7f679a0bc593713d21c25f51e
16 URL: https://metacpan.org/release/ExtUtils-Depends
17 BuildRequires: perl-ExtUtils-MakeMaker >= 6.17
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRequires: rpmbuil(macros) >= 1.745
22 BuildRequires: perl-Test-Simple >= 0.45
23 BuildRequires: perl(Test::Builder) >= 0.32
24 BuildRequires: perl(Test::Builder::Tester) >= 1.02
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 At some point or another, most programmers find they need to compare
31 floating-point numbers for equality. The typical idiom is to test if
32 the absolute value of the difference of the numbers is within a
33 desired tolerance, usually called epsilon. This module provides such
34 functions (delta_within and delta_ok) for use with Test::Harness.
35 Usage is similar to other test functions described in Test::More.
37 %description -l pl.UTF-8
38 W pewnych sytuacjach wielu programistów potrzebuje porównania liczb
39 zmiennoprzecinkowych pod kątem równości. Zwykle wykonuje się to
40 sprawdzając czy wartość bezwzględną różnicy liczb mieści się w zadanej
41 tolerancji, zwykle nazywanej epsilonem. Ten moduł udostępnia takie
42 funkcje (delta_within i delta_ok) do używania w Test::Harness.
43 Składnia jest podobna do innych funkcji testowych opisanych w
47 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %{__perl} Makefile.PL \
55 %{?with_tests:%{__make} test}
58 rm -rf $RPM_BUILD_ROOT
60 %{__make} pure_install \
61 DESTDIR=$RPM_BUILD_ROOT
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
69 %dir %{perl_vendorlib}/Test/Number
70 %{perl_vendorlib}/Test/Number/Delta.pm
71 %{_mandir}/man3/Test::Number::Delta.3pm*