URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2009-05-06 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Add I/O tests.
* tests/io/Makefile.am: Update for dicom and IM.
* tests/io/dicom/Makefile.am: New Makefile for dicom.
* tests/io/dicom/dicom.cc: New test.
* tests/io/magick/Makefile.am: New Makefile for IM.
* tests/io/magick/magick.cc: New test.
---
Makefile.am | 2 +
dicom/Makefile.am | 10 ++++++++
dicom/dicom.cc | 50 ++++++++++++++++++++++++++++++++++++++++++++
magick/Makefile.am | 10 ++++++++
magick/magick.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 132 insertions(+)
Index: trunk/milena/tests/io/Makefile.am
===================================================================
--- trunk/milena/tests/io/Makefile.am (revision 3764)
+++ trunk/milena/tests/io/Makefile.am (revision 3765)
@@ -3,8 +3,10 @@
include $(top_srcdir)/milena/tests/tests.mk
SUBDIRS = \
+ dicom \
dump \
fits \
+ magick \
off \
pbm \
pfm \
Index: trunk/milena/tests/io/dicom/dicom.cc
===================================================================
--- trunk/milena/tests/io/dicom/dicom.cc (revision 0)
+++ trunk/milena/tests/io/dicom/dicom.cc (revision 3765)
@@ -0,0 +1,50 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/io/dicom/dicom.cc
+///
+/// Test on mln::io::dicom::*.
+
+#include <mln/core/image/image2d.hh>
+#include <mln/io/dicom/load.hh>
+#include <mln/io/dump/save.hh>
+
+#include <mln/level/compare.hh>
+
+#include <mln/value/int_u12.hh>
+
+#include "tests/data.hh"
+
+#include <mln/debug/println.hh>
+
+int main()
+{
+ using namespace mln;
+
+ return 0;
+}
+
Index: trunk/milena/tests/io/dicom/Makefile.am
===================================================================
--- trunk/milena/tests/io/dicom/Makefile.am (revision 0)
+++ trunk/milena/tests/io/dicom/Makefile.am (revision 3765)
@@ -0,0 +1,10 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ dicom
+
+dicom_SOURCES = dicom.cc
+
+TESTS = $(check_PROGRAMS)
Index: trunk/milena/tests/io/magick/magick.cc
===================================================================
--- trunk/milena/tests/io/magick/magick.cc (revision 0)
+++ trunk/milena/tests/io/magick/magick.cc (revision 3765)
@@ -0,0 +1,60 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/io/magick/magick.cc
+///
+/// Test on mln::io::magick::*.
+
+#include <mln/core/image/image2d.hh>
+#include <mln/io/magick/load.hh>
+#include <mln/io/ppm/save.hh>
+
+#include <mln/level/compare.hh>
+
+#include <mln/value/int_u8.hh>
+#include <mln/value/rgb8.hh>
+
+#include "tests/data.hh"
+
+#include <mln/debug/println.hh>
+
+int main()
+{
+ using namespace mln;
+
+ {
+ image2d<value::rgb8> lena_im;
+ io::magick::load(lena_im, "lena.png");
+
+ image2d<value::rgb8> lena_mln;
+ io::ppm::load(lena_mln, "lena.ppm");
+
+ mln_assertion(lena_im.domain() == lena_mln.domain());
+ mln_assertion(lena_im == lena_mln);
+ }
+}
+
Index: trunk/milena/tests/io/magick/Makefile.am
===================================================================
--- trunk/milena/tests/io/magick/Makefile.am (revision 0)
+++ trunk/milena/tests/io/magick/Makefile.am (revision 3765)
@@ -0,0 +1,10 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ magick
+
+magick_SOURCES = magick.cc
+
+TESTS = $(check_PROGRAMS)