[med-svn] [SCM] mia branch, master, updated. upstream/2.0.7-64-gb612b58
Gert Wollny
gw.fossdev at gmail.com
Wed Feb 27 10:38:42 UTC 2013
The following commit has been merged in the master branch:
commit b616e7623b2ac797efec9bd6dc3b878cf7d625ed
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Tue Feb 26 16:51:29 2013 +0100
add the test-fix patch to debian
diff --git a/debian/patches/03_fix_test_close_to_zero.patch b/debian/patches/03_fix_test_close_to_zero.patch
new file mode 100644
index 0000000..e2b1e9e
--- /dev/null
+++ b/debian/patches/03_fix_test_close_to_zero.patch
@@ -0,0 +1,57 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ mia (2.0.8-1) UNRELEASED; urgency=low
+ .
+ * Initial release (Closes: #694437)
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Bug-Debian: http://bugs.debian.org/694437
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- mia-2.0.8.orig/mia/3d/filter/test_scale.cc
++++ mia-2.0.8/mia/3d/filter/test_scale.cc
+@@ -203,7 +203,10 @@ BOOST_AUTO_TEST_CASE( test_downscale_flo
+ for (size_t i = 0; i < 64; ++i) {
+
+ cvdebug() << i << ":" << fscaled[i] << " - " << test_float[i] << '\n';
+- BOOST_CHECK_CLOSE(fscaled[i], test_float[i], 0.1);
++ if (fabs(test_float[i]) > 1e-16)
++ BOOST_CHECK_CLOSE(fscaled[i], test_float[i], 0.1);
++ else
++ BOOST_CHECK((fabs(fscaled[i]) < 1e-16));
+ }
+
+
+--- mia-2.0.8.orig/mia/core/test_splineparzenmi.cc
++++ mia-2.0.8/mia/core/test_splineparzenmi.cc
+@@ -254,9 +254,12 @@ BOOST_FIXTURE_TEST_CASE( test_self, CSpl
+ cvdebug() << self_grad << " vs " << test_grad << ":" << self_grad / test_grad<<"\n";
+
+
+- if (test_grad != 0)
++ // if the gradient is very small test against 'close to zero'
++ if (fabs(test_grad) > 1e-16)
+ BOOST_CHECK_CLOSE(self_grad, test_grad, 0.1);
+- }
++ else
++ BOOST_CHECK(fabs(self_grad) < 1e-16);
++ }
+
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 8cd3ed1..0eb03fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
01_disable-treeview-for-jquery-compatibility.patch
02_2dmyoset-manpage-lintian-fix.patch
+03_fix_test_close_to_zero.patch
diff --git a/mia/3d/filter/test_scale.cc b/mia/3d/filter/test_scale.cc
index 6e9bcae..90c9e51 100644
--- a/mia/3d/filter/test_scale.cc
+++ b/mia/3d/filter/test_scale.cc
@@ -203,10 +203,7 @@ BOOST_AUTO_TEST_CASE( test_downscale_float_persists )
for (size_t i = 0; i < 64; ++i) {
cvdebug() << i << ":" << fscaled[i] << " - " << test_float[i] << '\n';
- if (fabs(test_float[i]) > 1e-16)
- BOOST_CHECK_CLOSE(fscaled[i], test_float[i], 0.1);
- else
- BOOST_CHECK((fabs(fscaled[i]) < 1e-16));
+ BOOST_CHECK_CLOSE(fscaled[i], test_float[i], 0.1);
}
diff --git a/mia/core/test_splineparzenmi.cc b/mia/core/test_splineparzenmi.cc
index 7856ae2..9fac7e0 100644
--- a/mia/core/test_splineparzenmi.cc
+++ b/mia/core/test_splineparzenmi.cc
@@ -254,12 +254,9 @@ BOOST_FIXTURE_TEST_CASE( test_self, CSplineParzenMIFixture )
cvdebug() << self_grad << " vs " << test_grad << ":" << self_grad / test_grad<<"\n";
- // if the gradient is very small test against 'close to zero'
- if (fabs(test_grad) > 1e-16)
+ if (test_grad != 0)
BOOST_CHECK_CLOSE(self_grad, test_grad, 0.1);
- else
- BOOST_CHECK(fabs(self_grad) < 1e-16);
- }
+ }
}
--
Packaging of mia in Debian
More information about the debian-med-commit
mailing list