projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78500a0
)
Try to fix Windows build.
author
Carl Hetherington
<cth@carlh.net>
Sun, 31 Dec 2017 01:40:57 +0000
(
01:40
+0000)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 31 Dec 2017 01:40:57 +0000
(
01:40
+0000)
test/test.cc
patch
|
blob
|
history
diff --git
a/test/test.cc
b/test/test.cc
index 41b845f85626c38859f45c3bbeb0af554575b3e3..dff7800ce8c0ee2f470ae2c906d88fbb5c86870d 100644
(file)
--- a/
test/test.cc
+++ b/
test/test.cc
@@
-236,8
+236,15
@@
check_image (boost::filesystem::path ref, boost::filesystem::path check)
ref_image.read (ref.string ());
Magick::Image check_image;
check_image.read (check.string ());
ref_image.read (ref.string ());
Magick::Image check_image;
check_image.read (check.string ());
+ /* XXX: this is a hack; we really want the ImageMagick call but GraphicsMagick doesn't have it;
+ this may cause random test failures on platforms that use GraphicsMagick.
+ */
+#ifdef DCPOMATIC_IMAGE_MAGICK
double const dist = ref_image.compare(check_image, Magick::RootMeanSquaredErrorMetric);
BOOST_CHECK_MESSAGE (dist < 0.001, ref << " differs from " << check << " " << dist);
double const dist = ref_image.compare(check_image, Magick::RootMeanSquaredErrorMetric);
BOOST_CHECK_MESSAGE (dist < 0.001, ref << " differs from " << check << " " << dist);
+#else
+ BOOST_CHECK_MESSAGE (!ref_image.compare(check_image), ref << " differs from " << check);
+#endif
}
void
}
void