r44842 - in /packages/openturns/trunk/debian/patches: series test-output.patch
barbier-guest at users.alioth.debian.org
barbier-guest at users.alioth.debian.org
Sun May 20 12:32:36 UTC 2012
Author: barbier-guest
Date: Sun May 20 12:32:35 2012
New Revision: 44842
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=44842
Log:
New patch: test-output.patch
Fix test output, some compilers print 'df(x)=' twice because
exception is thrown after text is printed to stdout.
Added:
packages/openturns/trunk/debian/patches/test-output.patch
Modified:
packages/openturns/trunk/debian/patches/series
Modified: packages/openturns/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/openturns/trunk/debian/patches/series?rev=44842&op=diff
==============================================================================
--- packages/openturns/trunk/debian/patches/series (original)
+++ packages/openturns/trunk/debian/patches/series Sun May 20 12:32:35 2012
@@ -10,4 +10,5 @@
bigendian-randomgenerator.patch
installcheck.patch
disable-test-wrapper.patch
+test-output.patch
debian-soname.patch
Added: packages/openturns/trunk/debian/patches/test-output.patch
URL: http://svn.debian.org/wsvn/debian-science/packages/openturns/trunk/debian/patches/test-output.patch?rev=44842&op=file
==============================================================================
--- packages/openturns/trunk/debian/patches/test-output.patch (added)
+++ packages/openturns/trunk/debian/patches/test-output.patch Sun May 20 12:32:35 2012
@@ -1,0 +1,32 @@
+Description: Fix test output, some compilers print df(x)= twice
+ because exception is thrown after text is printed to stdout.
+Author: Denis Barbier <bouzim at gmail.com>
+Origin: Debian
+Forwarded: http://trac.openturns.org/ticket/492
+Applied-Upstream: no
+Last-Update: 2012-05-20
+
+Index: openturns/lib/test/t_NumericalMathFunction_analytical.cxx
+===================================================================
+--- openturns.orig/lib/test/t_NumericalMathFunction_analytical.cxx
++++ openturns/lib/test/t_NumericalMathFunction_analytical.cxx
+@@ -95,7 +95,8 @@ int main(int argc, char *argv[])
+ std::cout << "f(" << x[0] << ")=" << std::scientific << std::setprecision(4) << f(x)[0] << std::endl;
+ try
+ {
+- std::cout << "df(" << x[0] << ")=" << std::scientific << std::setprecision(4) << f.gradient(x)(0, 0) << std::endl;
++ NumericalScalar grad_f(f.gradient(x)(0,0));
++ std::cout << "df(" << x[0] << ")=" << std::scientific << std::setprecision(4) << grad_f << std::endl;
+ }
+ catch(...)
+ {
+@@ -104,7 +105,8 @@ int main(int argc, char *argv[])
+ }
+ try
+ {
+- std::cout << "d2f(" << x[0] << ")=" << std::scientific << std::setprecision(4) << f.hessian(x)(0, 0, 0) << std::endl;
++ NumericalScalar hess_f(f.hessian(x)(0, 0, 0));
++ std::cout << "d2f(" << x[0] << ")=" << std::scientific << std::setprecision(4) << hess_f << std::endl;
+ }
+ catch(...)
+ {
More information about the debian-science-commits
mailing list