
https://svn.lrde.epita.fr/svn/oln/trunk/milena Attention aux d�tails ! Il faut lancer `make check' r�guli�rement pour v�rifier que tout fonctionne correctement. Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Fix tests/fun/v2v/. * tests/fun/v2v/rgb_hsi_conversion.cc: Add copyright header. Don't use hard-coded paths for I/O operations. * tests/fun/v2v/Makefile.am (check_PROGRAMS): Add rgb_hsi_conversion. (norm_SOURCES): Remove rgb_hsi_conversion.cc. (rgb_hsi_conversion_SOURCES): New. Makefile.am | 5 +++-- rgb_hsi_conversion.cc | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 5 deletions(-) Index: tests/fun/v2v/rgb_hsi_conversion.cc --- tests/fun/v2v/rgb_hsi_conversion.cc (revision 1918) +++ tests/fun/v2v/rgb_hsi_conversion.cc (working copy) @@ -1,8 +1,38 @@ -#include <mln/value/hsi.hh> -#include <mln/fun/v2v/rgb_to_hsi.hh> +// Copyright (C) 2008 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/fun/v2v/rgb_hsi_conversion.cc +/// \brief Test RGB-to-HSI conversion. #include <cmath> +#include <mln/value/hsi.hh> +#include <mln/fun/v2v/rgb_to_hsi.hh> + #include <mln/core/image2d.hh> #include <mln/value/rgb8.hh> @@ -11,6 +41,7 @@ #include <mln/math/round.hh> #include <mln/level/transform.hh> +#include "tests/data.hh" template <typename I1, typename I2> @@ -49,7 +80,7 @@ using namespace mln; image2d<value::rgb8> lena; - io::ppm::load(lena, "../../img/lena.ppm"); + io::ppm::load(lena, MLN_IMG_DIR "/lena.ppm"); image2d<value::hsi_f> lena_hsi = level::transform(lena, fun::v2v::f_rgb_to_hsi_f); Index: tests/fun/v2v/Makefile.am --- tests/fun/v2v/Makefile.am (revision 1918) +++ tests/fun/v2v/Makefile.am (working copy) @@ -2,8 +2,9 @@ include $(top_srcdir)/milena/tests/tests.mk -check_PROGRAMS = norm +check_PROGRAMS = norm rgb_hsi_conversion -norm_SOURCES = norm.cc rgb_hsi_conversion.cc +norm_SOURCES = norm.cc +rgb_hsi_conversion_SOURCES = rgb_hsi_conversion.cc TESTS = $(check_PROGRAMS)