proto-1.0 151: Fix core/image_valuedness test

https://svn.lrde.epita.fr/svn/oln/prototypes/proto-1.0 ChangeLog | 9 +++++++ tests/core/tests/image_valuedness | 41 +++++++++++++++++++++++++++-------- tests/core/tests/image_vectorialness | 26 ---------------------- 3 files changed, 41 insertions(+), 35 deletions(-) Index: olena/ChangeLog from Roland Levillain <roland@lrde.epita.fr> Fix core/image_valuedness test. * tests/core/tests/image_vectorialness: Rename file as... * tests/core/tests/image_valuedness: ...this. Catch up with the new oln/abstract/image_valuedness.hh, and augment the test case. 2005-04-14 Roland Levillain <roland@lrde.epita.fr> Index: olena/tests/core/tests/image_vectorialness --- olena/tests/core/tests/image_vectorialness (revision 150) +++ olena/tests/core/tests/image_vectorialness (working copy) @@ -1,26 +0,0 @@ - -#include <iostream> - -#include <ntg/all.hh> -#include <oln/basics2d.hh> - -#include <oln/fancy/iota.hh> -#include <oln/fancy/print.hh> - -#include "check.hh" -#include "data.hh" - - - -template <typename I> -void foo_i(const oln::abstract::integer_image<I>& input) -{} - - -bool check() -{ - // it lacks test for decimal, vectorial, ... images. - oln::image2d<ntg::int_u8> ima_i; - foo_i(ima_i); - return false; -} Index: olena/tests/core/tests/image_valuedness --- olena/tests/core/tests/image_valuedness (revision 149) +++ olena/tests/core/tests/image_valuedness (working copy) @@ -1,26 +1,49 @@ + // -*- C++ -*- +#include <string> -#include <iostream> - -#include <ntg/all.hh> +#include <ntg/bin.hh> +#include <ntg/int.hh> +#include <ntg/cplx.hh> #include <oln/basics2d.hh> -#include <oln/fancy/iota.hh> -#include <oln/fancy/print.hh> - #include "check.hh" #include "data.hh" +template <typename I> +void foo_scalar(const oln::abstract::scalar_valued_image<I>& input) +{} + +template <typename I> +void foo_vector(const oln::abstract::vector_valued_image<I>& input) +{} + +template <typename I> +void foo_label(const oln::abstract::label_valued_image<I>& input) +{} template <typename I> -void foo_i(const oln::abstract::integer_image<I>& input) +void foo_data(const oln::abstract::data_valued_image<I>& input) {} bool check() { - // it lacks test for decimal, vectorial, ... images. + // Scalar. oln::image2d<ntg::int_u8> ima_i; - foo_i(ima_i); + foo_scalar(ima_i); + + // Vector. + oln::image2d<ntg::cplx<ntg::rect, float> > ima_v; + foo_vector(ima_v); + + // Label. + oln::image2d<ntg::bin> ima_l; + foo_label(ima_l); + + // Other data. + oln::image2d<std::string> ima_d; + foo_data(ima_d); + return false; }
participants (1)
-
Roland Levillain