diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-12-31 01:40:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-12-31 01:40:57 +0000 |
| commit | 25c7dba5ba74b03ac30abcd6da86c358c2581ac7 (patch) | |
| tree | c9aebcda231ec8630d7ec0866ea621d338d65f44 /test | |
| parent | 78500a062e448a9ac49db304fa1a05c802f35d7e (diff) | |
Try to fix Windows build.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index 41b845f85..dff7800ce 100644 --- 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 ()); + /* 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); +#else + BOOST_CHECK_MESSAGE (!ref_image.compare(check_image), ref << " differs from " << check); +#endif } void |
