r56657 - in /trunk/libjavascript-perl/debian: changelog patches/fix-longdouble-comparison.patch patches/series

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Apr 22 18:55:46 UTC 2010


Author: dmn
Date: Thu Apr 22 18:55:34 2010
New Revision: 56657

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56657
Log:
add a patch fixing tests for double numbers evaluation.
Closes: #578548 -- FTBFS with Perl 5.12.0: long doubles

Added:
    trunk/libjavascript-perl/debian/patches/fix-longdouble-comparison.patch
Modified:
    trunk/libjavascript-perl/debian/changelog
    trunk/libjavascript-perl/debian/patches/series

Modified: trunk/libjavascript-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/changelog?rev=56657&op=diff
==============================================================================
--- trunk/libjavascript-perl/debian/changelog (original)
+++ trunk/libjavascript-perl/debian/changelog Thu Apr 22 18:55:34 2010
@@ -1,3 +1,10 @@
+libjavascript-perl (1.16-2) UNRELEASED; urgency=low
+
+  * add a patch fixing tests for double numbers evaluation.
+    Closes: #578548 -- FTBFS with Perl 5.12.0: long doubles
+
+ -- Damyan Ivanov <dmn at debian.org>  Thu, 22 Apr 2010 21:54:22 +0300
+
 libjavascript-perl (1.16-1) unstable; urgency=low
 
   * New upstream release

Added: trunk/libjavascript-perl/debian/patches/fix-longdouble-comparison.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/patches/fix-longdouble-comparison.patch?rev=56657&op=file
==============================================================================
--- trunk/libjavascript-perl/debian/patches/fix-longdouble-comparison.patch (added)
+++ trunk/libjavascript-perl/debian/patches/fix-longdouble-comparison.patch Thu Apr 22 18:55:34 2010
@@ -1,0 +1,23 @@
+Description: Replace equality test between doubles with "<epsilon" test
+ Thing is, doubles are not exact and errors are possible in the least
+ significant digit.
+ This patch replaces the equality tests with a test if the difference is smaller than a very small number
+Bug-Debian: 578548
+Forwarded: no
+Author: Damyan Ivanov <dmn at debian.org>
+Last-Update: 2010-04-22
+
+--- a/t/01-types-from-js.t
++++ b/t/01-types-from-js.t
+@@ -21,9 +21,9 @@ is($cx1->eval("1;"), 1, "Positive intege
+ is($cx1->eval("5000000000;"), 5_000_000_000, "Really big integers");
+ 
+ # Doubles
+-is($cx1->eval("-1.1;"), -1.1, "Negative doubles");
++ok(abs($cx1->eval("-1.1;") - -1.1) < 1e-14, "Negative doubles");
+ is($cx1->eval("0.0;"), 0.0, "Zero doubles");
+-is($cx1->eval("1.1;"), 1.1, "Positive doubles");
++ok(abs($cx1->eval("1.1;")- 1.1) < 1e-14, "Positive doubles");
+ is($cx1->eval("5000000000.5;"), 5000000000.5, "Really big doubles");
+ 
+ # Strings

Modified: trunk/libjavascript-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/patches/series?rev=56657&op=diff
==============================================================================
--- trunk/libjavascript-perl/debian/patches/series (original)
+++ trunk/libjavascript-perl/debian/patches/series Thu Apr 22 18:55:34 2010
@@ -1,2 +1,3 @@
 remove-branch-handler
 pod-spelling.patch
+fix-longdouble-comparison.patch




More information about the Pkg-perl-cvs-commits mailing list