* tests/io/pdf/load.cc: Here. --- milena/ChangeLog | 6 ++++++ milena/tests/io/pdf/load.cc | 26 ++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog index be1ca39..2480741 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,9 @@ +2014-07-03 Roland Levillain roland@lrde.epita.fr + + Disable some tests depending on Poppler for compatibility reasons. + + * tests/io/pdf/load.cc: Here. + 2014-07-02 Roland Levillain roland@lrde.epita.fr
Add a NEWS file to Milena. diff --git a/milena/tests/io/pdf/load.cc b/milena/tests/io/pdf/load.cc index c517784..2ae9220 100644 --- a/milena/tests/io/pdf/load.cc +++ b/milena/tests/io/pdf/load.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2013 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2013, 2014 EPITA Research and Development Laboratory (LRDE). // // This file is part of Olena. // @@ -23,23 +23,30 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License.
+// Exercise mln::io::pdf::load. + #include <mln/core/image/image2d.hh> #include <mln/data/compare.hh> #include <mln/value/rgb8.hh> #include <mln/io/ppm/load.hh> #include <mln/io/pdf/load.hh> + #include "tests/data.hh"
+ int main() { using namespace mln;
+ // FIXME: Disabled (see below). +#if 0 image2dvalue::rgb8 page0, page1, page2, page3;
io::ppm::load(page0, MLN_TESTS_IMG_DIR "/example-0.ppm"); io::ppm::load(page1, MLN_TESTS_IMG_DIR "/example-1.ppm"); io::ppm::load(page2, MLN_TESTS_IMG_DIR "/example-2.ppm"); io::ppm::load(page3, MLN_TESTS_IMG_DIR "/example-3.ppm"); +#endif
// Loading full PDF. { @@ -47,20 +54,29 @@ int main() io::pdf::load(arr, MLN_TESTS_IMG_DIR "/example.pdf", 75);
mln_assertion(arr.size() == 4); + /* FIXME: Disabled, as various versions/installations of poppler + produce slightly different images (namely, version 0.18.4 on + Debian GNU/Linux 7.5 and version 0.24.5 from the MacPorts). This + might be caused by different font configurations, too. */ +#if 0 mln_assertion(arr[0] == page0); mln_assertion(arr[1] == page1); mln_assertion(arr[2] == page2); mln_assertion(arr[3] == page3); +#endif }
- // Loading a page range + // Loading a page range. { util::array<image2dvalue::rgb8 > arr; io::pdf::load(arr, MLN_TESTS_IMG_DIR "/example.pdf", 1, 2, 75);
mln_assertion(arr.size() == 2); + // FIXME: Disabled (see above). +#if 0 mln_assertion(arr[0] == page1); mln_assertion(arr[1] == page2); +#endif }
// Loading specific pages. @@ -72,8 +88,11 @@ int main() io::pdf::load(arr, MLN_TESTS_IMG_DIR "/example.pdf", pages, 75);
mln_assertion(arr.size() == 2); + // FIXME: Disabled (see above). +#if 0 mln_assertion(arr[0] == page1); mln_assertion(arr[1] == page3); +#endif }
// Loading a specific page. @@ -82,7 +101,10 @@ int main() io::pdf::load(ima, MLN_TESTS_IMG_DIR "/example.pdf", 3, 75);
mln_assertion(ima.is_valid()); + // FIXME: Disabled (see above). +#if 0 mln_assertion(ima == page3); +#endif }
}