last-svn-commit-461-gbd5519b Fix tests in Milena.

* mln/draw/dashed_line.hh, * mln/fun/n2v/white_gaussian.hh, * mln/fun/v2v/rgb_to_int_u.hh, * mln/io/dump/get_header.hh, * mln/io/raw/get_header.hh: Add missing includes. * tests/topo/skeleton/crest.cc: Fix reference results since a bug have been fixed. * tests/unit_test/cond_tests_qt: Add conditional tests. * tests/unit_test/unit-tests.mk: Regen. --- milena/ChangeLog | 16 ++++++++++++++++ milena/mln/draw/dashed_line.hh | 2 +- milena/mln/fun/n2v/white_gaussian.hh | 4 ++-- milena/mln/fun/v2v/rgb_to_int_u.hh | 7 ++++++- milena/mln/io/dump/get_header.hh | 1 + milena/mln/io/raw/get_header.hh | 1 + milena/tests/topo/skeleton/crest.cc | 10 +++++----- milena/tests/unit_test/cond_tests_qt | 2 ++ milena/tests/unit_test/unit-tests.mk | 18 ++++++++++++++---- 9 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 milena/tests/unit_test/cond_tests_qt diff --git a/milena/ChangeLog b/milena/ChangeLog index b149b2b..f960f53 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,21 @@ 2010-08-11 Guillaume Lazzara <z@lrde.epita.fr> + Fix tests in Milena. + + * mln/draw/dashed_line.hh, + * mln/fun/n2v/white_gaussian.hh, + * mln/fun/v2v/rgb_to_int_u.hh, + * mln/io/dump/get_header.hh, + * mln/io/raw/get_header.hh: Add missing includes. + + * tests/topo/skeleton/crest.cc: Fix reference results since a bug + have been fixed. + + * tests/unit_test/cond_tests_qt + * tests/unit_test/unit-tests.mk + +2010-08-11 Guillaume Lazzara <z@lrde.epita.fr> + Add missing traces. * mln/convert/to_qimage.hh, diff --git a/milena/mln/draw/dashed_line.hh b/milena/mln/draw/dashed_line.hh index 6b0d244..4a31ae9 100644 --- a/milena/mln/draw/dashed_line.hh +++ b/milena/mln/draw/dashed_line.hh @@ -35,7 +35,7 @@ # include <mln/core/concept/image.hh> # include <mln/core/site_set/p_line2d.hh> # include <mln/core/image/imorph/safe.hh> -# include <mln/data/paste.hh> +# include <mln/data/fill.hh> # include <mln/pw/image.hh> # include <mln/pw/cst.hh> diff --git a/milena/mln/fun/n2v/white_gaussian.hh b/milena/mln/fun/n2v/white_gaussian.hh index 53afbf6..55d6cc1 100644 --- a/milena/mln/fun/n2v/white_gaussian.hh +++ b/milena/mln/fun/n2v/white_gaussian.hh @@ -34,7 +34,7 @@ # include <ctime> # include <mln/core/concept/function.hh> - +# include <mln/math/sqrt.hh> namespace mln @@ -86,7 +86,7 @@ namespace mln } X = X - 25.f; /* set mean to 0 */ - X = X * sqrt(12 / 50.f); /* adjust variance to 1 */ + X = X * math::sqrt(12 / 50.f); /* adjust variance to 1 */ return sigma * X; }; diff --git a/milena/mln/fun/v2v/rgb_to_int_u.hh b/milena/mln/fun/v2v/rgb_to_int_u.hh index d04dbf0..1be1ae2 100644 --- a/milena/mln/fun/v2v/rgb_to_int_u.hh +++ b/milena/mln/fun/v2v/rgb_to_int_u.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -27,6 +28,10 @@ #ifndef MLN_FUN_V2V_RGB_TO_INT_U_HH # define MLN_FUN_V2V_RGB_TO_INT_U_HH +# include <mln/core/concept/function.hh> +# include <mln/value/int_u8.hh> +# include <mln/value/rgb8.hh> + namespace mln { diff --git a/milena/mln/io/dump/get_header.hh b/milena/mln/io/dump/get_header.hh index 2cfb4cb..2eaffdd 100644 --- a/milena/mln/io/dump/get_header.hh +++ b/milena/mln/io/dump/get_header.hh @@ -38,6 +38,7 @@ # include <mln/core/box_runstart_piter.hh> # include <mln/core/pixel.hh> # include <mln/data/memcpy_.hh> +# include <mln/util/array.hh> namespace mln { diff --git a/milena/mln/io/raw/get_header.hh b/milena/mln/io/raw/get_header.hh index c263cff..b969b2c 100644 --- a/milena/mln/io/raw/get_header.hh +++ b/milena/mln/io/raw/get_header.hh @@ -38,6 +38,7 @@ # include <mln/core/box_runstart_piter.hh> # include <mln/core/pixel.hh> # include <mln/data/memcpy_.hh> +# include <mln/util/array.hh> namespace mln { diff --git a/milena/tests/topo/skeleton/crest.cc b/milena/tests/topo/skeleton/crest.cc index 894894f..993854e 100644 --- a/milena/tests/topo/skeleton/crest.cc +++ b/milena/tests/topo/skeleton/crest.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of Olena. // @@ -33,17 +34,16 @@ # include <mln/transform/distance_front.hh> # include <mln/value/int_u8.hh> - int main() { using namespace mln; bool ref_dat[][9] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 0, 0, 0 }, - { 0, 0, 0, 0, 1, 1, 0, 1, 0 }, - { 0, 1, 1, 1, 1, 1, 0, 1, 0 }, + { 0, 0, 0, 0, 1, 1, 0, 0, 0 }, + { 0, 0, 0, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 1, 0, 1, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; bool in_dat[][9] = { { 0, 0, 0, 0, 1, 1, 1, 0, 0 }, diff --git a/milena/tests/unit_test/cond_tests_qt b/milena/tests/unit_test/cond_tests_qt new file mode 100644 index 0000000..8783d35 --- /dev/null +++ b/milena/tests/unit_test/cond_tests_qt @@ -0,0 +1,2 @@ +mln/convert/to_qimage.hh +mln/convert/to_qimage_nocopy.hh diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk index bc0b6df..31dddae 100644 --- a/milena/tests/unit_test/unit-tests.mk +++ b/milena/tests/unit_test/unit-tests.mk @@ -53,6 +53,20 @@ mln_io_magick_save_SOURCES = mln_io_magick_save.cc endif HAVE_MAGICKXX # Starting a conditional unit test list. +if HAVE_QT +check_PROGRAMS += \ +mln_convert_to_qimage \ +mln_convert_to_qimage_nocopy + +mln_convert_to_qimage_CPPFLAGS= ${QT_CPPFLAGS} ${AM_CPPFLAGS} +mln_convert_to_qimage_LDFLAGS= ${QT_LDFLAGS} ${AM_LDFLAGS} +mln_convert_to_qimage_SOURCES = mln_convert_to_qimage.cc +mln_convert_to_qimage_nocopy_CPPFLAGS= ${QT_CPPFLAGS} ${AM_CPPFLAGS} +mln_convert_to_qimage_nocopy_LDFLAGS= ${QT_LDFLAGS} ${AM_LDFLAGS} +mln_convert_to_qimage_nocopy_SOURCES = mln_convert_to_qimage_nocopy.cc +endif HAVE_QT + +# Starting a conditional unit test list. if HAVE_TIFF check_PROGRAMS += \ mln_io_tiff_all \ @@ -223,8 +237,6 @@ mln_convert_to_fun \ mln_convert_to_image \ mln_convert_to_p_array \ mln_convert_to_p_set \ -mln_convert_to_qimage \ -mln_convert_to_qimage_nocopy \ mln_convert_to_upper_window \ mln_convert_to_window \ mln_core_a_point_of \ @@ -1545,8 +1557,6 @@ mln_convert_to_fun_SOURCES = mln_convert_to_fun.cc mln_convert_to_image_SOURCES = mln_convert_to_image.cc mln_convert_to_p_array_SOURCES = mln_convert_to_p_array.cc mln_convert_to_p_set_SOURCES = mln_convert_to_p_set.cc -mln_convert_to_qimage_SOURCES = mln_convert_to_qimage.cc -mln_convert_to_qimage_nocopy_SOURCES = mln_convert_to_qimage_nocopy.cc mln_convert_to_upper_window_SOURCES = mln_convert_to_upper_window.cc mln_convert_to_window_SOURCES = mln_convert_to_window.cc mln_core_a_point_of_SOURCES = mln_core_a_point_of.cc -- 1.5.6.5
participants (1)
-
Guillaume Lazzara