URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-28 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Add full tests for border.
* tests/border/adjust_full.cc,
* tests/border/duplicate_full.cc,
* tests/border/fill_full.cc,
* tests/border/mirror_full.cc: New full tests.
* tests/border/duplicate.cc: Fix Doxygen comment.
---
adjust_full.cc | 64 ++++++++
duplicate.cc | 2
duplicate_full.cc | 171 +++++++++++++++++++++++
fill_full.cc | 398 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
mirror_full.cc | 173 +++++++++++++++++++++++
5 files changed, 807 insertions(+), 1 deletion(-)
Index: trunk/milena/tests/border/mirror_full.cc
===================================================================
--- trunk/milena/tests/border/mirror_full.cc (revision 0)
+++ trunk/milena/tests/border/mirror_full.cc (revision 1565)
@@ -0,0 +1,173 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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/border/duplicate_full.cc
+ *
+ * \brief Tests on mln::border::duplicate.
+ */
+
+#include <mln/core/image1d.hh>
+#include <mln/core/image2d.hh>
+#include <mln/debug/iota.hh>
+#include <mln/border/mirror.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/value/int_s8.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+
+ {
+ (std::cerr << "Test border::mirror on int with border = 3 ...
").flush ();
+
+ typedef int T;
+ int border = 3;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::mirror (ima);
+
+ T vs[110] =
+ {
+ 1, 1, 1, 11, 12, 13, 14, 15, 5, 5, 5,
+ 1, 1, 1, 6, 7, 8, 9, 10, 5, 5, 5,
+ 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5,
+ 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3,
+ 8, 7, 6, 6, 7, 8, 9, 10, 10, 9, 8,
+ 13, 12, 11, 11, 12, 13, 14, 15, 15, 14, 13,
+ 18, 17, 16, 16, 17, 18, 19, 20, 20, 19, 18,
+ 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20,
+ 16, 16, 16, 11, 12, 13, 14, 15, 20, 20, 20,
+ 16, 16, 16, 6, 7, 8, 9, 10, 20, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ (std::cerr << "Test border::mirror on int_s8 with border = 2 ...
").flush ();
+
+ typedef value::int_s8 T;
+ int border = 2;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::mirror (ima);
+
+ T vs[72] =
+ {
+ 1, 1, 6, 7, 8, 9, 10, 5, 5,
+ 1, 1, 1, 2, 3, 4, 5, 5, 5,
+ 2, 1, 1, 2, 3, 4, 5, 5, 4,
+ 7, 6, 6, 7, 8, 9, 10, 10, 9,
+ 12, 11, 11, 12, 13, 14, 15, 15, 14,
+ 17, 16, 16, 17, 18, 19, 20, 20, 19,
+ 16, 16, 16, 17, 18, 19, 20, 20, 20,
+ 16, 16, 11, 12, 13, 14, 15, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ (std::cerr << "Test border::mirror on int_u8 with border = 1 ...
").flush ();
+
+ typedef value::int_u8 T;
+ int border = 1;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::mirror (ima);
+
+ T vs[49] =
+ {
+ 1, 1, 2, 3, 4, 5, 5,
+ 1, 1, 2, 3, 4, 5, 5,
+ 6, 6, 7, 8, 9, 10, 10,
+ 11, 11, 12, 13, 14, 15, 15,
+ 16, 16, 17, 18, 19, 20, 20,
+ 16, 16, 17, 18, 19, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ (std::cerr << "Test border::mirror on int with border = 0 ...
").flush ();
+
+ int border = 0;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<int> ima(row, col, border);
+ debug::iota (ima);
+ border::mirror (ima);
+
+ int vs[20] =
+ {
+ 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+}
Index: trunk/milena/tests/border/adjust_full.cc
===================================================================
--- trunk/milena/tests/border/adjust_full.cc (revision 0)
+++ trunk/milena/tests/border/adjust_full.cc (revision 1565)
@@ -0,0 +1,64 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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/border/adjust_full.cc
+ *
+ * \brief Tests on mln::border::adjust.
+ */
+
+#include <mln/core/image2d.hh>
+#include <mln/border/get.hh>
+#include <mln/border/adjust.hh>
+
+int main()
+{
+ using namespace mln;
+
+ typedef image2d<int> I;
+
+ I ima(3, 3, 2);
+ border::adjust(ima, 3);
+ mln_assertion(border::get(ima) == 3);
+
+ border::adjust(ima, 5);
+ mln_assertion(border::get(ima) == 5);
+
+ border::adjust(ima, 1);
+ mln_assertion(border::get(ima) == 5);
+
+ border::adjust(ima, 4);
+ mln_assertion(border::get(ima) == 5);
+
+ border::adjust(ima, 42);
+ mln_assertion(border::get(ima) == 42);
+
+ border::adjust(ima, 51);
+ mln_assertion(border::get(ima) == 51);
+
+ border::adjust(ima, 2);
+ mln_assertion(border::get(ima) == 51);
+}
Index: trunk/milena/tests/border/duplicate_full.cc
===================================================================
--- trunk/milena/tests/border/duplicate_full.cc (revision 0)
+++ trunk/milena/tests/border/duplicate_full.cc (revision 1565)
@@ -0,0 +1,171 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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/border/duplicate_full.cc
+ *
+ * \brief Tests on mln::border::duplicate.
+ */
+
+#include <mln/core/image2d.hh>
+#include <mln/debug/iota.hh>
+#include <mln/border/duplicate.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/value/int_s8.hh>
+
+
+using namespace mln;
+
+int
+main (void)
+{
+ {
+ (std::cerr << "Test border::mirror on int with border = 3 ...
").flush ();
+
+ typedef int T;
+ int border = 3;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::duplicate (ima);
+
+ T vs[110] =
+ {
+ 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5,
+ 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5,
+ 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5,
+ 1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5,
+ 6, 6, 6, 6, 7, 8, 9, 10, 10, 10, 10,
+ 11, 11, 11, 11, 12, 13, 14, 15, 15, 15, 15,
+ 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20,
+ 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20,
+ 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20,
+ 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ (std::cerr << "Test border::mirror on int_u8 with border = 2 ...
").flush ();
+
+ typedef value::int_u8 T;
+ int border = 2;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::duplicate (ima);
+
+ T vs[72] =
+ {
+ 1, 1, 1, 2, 3, 4, 5, 5, 5,
+ 1, 1, 1, 2, 3, 4, 5, 5, 5,
+ 1, 1, 1, 2, 3, 4, 5, 5, 5,
+ 6, 6, 6, 7, 8, 9, 10, 10, 10,
+ 11, 11, 11, 12, 13, 14, 15, 15, 15,
+ 16, 16, 16, 17, 18, 19, 20, 20, 20,
+ 16, 16, 16, 17, 18, 19, 20, 20, 20,
+ 16, 16, 16, 17, 18, 19, 20, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ (std::cerr << "Test border::mirror on int_s8 with border = 1 ...
").flush ();
+
+ typedef value::int_s8 T;
+ int border = 1;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::duplicate (ima);
+
+ T vs[49] =
+ {
+ 1, 1, 2, 3, 4, 5, 5,
+ 1, 1, 2, 3, 4, 5, 5,
+ 6, 6, 7, 8, 9, 10, 10,
+ 11, 11, 12, 13, 14, 15, 15,
+ 16, 16, 17, 18, 19, 20, 20,
+ 16, 16, 17, 18, 19, 20, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+ std::cerr << "OK" << std::endl;
+ }
+
+
+ {
+ (std::cerr << "Test border::mirror on int with border = 0 ...
").flush ();
+
+ typedef int T;
+ int border = 0;
+ int row = 4;
+ int col = 5;
+
+ int r = row + 2 * border;
+ int c = col + 2 * border;
+
+ image2d<T> ima(row, col, border);
+ debug::iota (ima);
+ border::duplicate (ima);
+
+ T vs[20] =
+ {
+ 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20
+ };
+
+ for (int i = 0; i < c * r; ++i)
+ mln_assertion(ima[i] == vs[i]);
+ std::cerr << "OK" << std::endl;
+ }
+
+
+}
Index: trunk/milena/tests/border/fill_full.cc
===================================================================
--- trunk/milena/tests/border/fill_full.cc (revision 0)
+++ trunk/milena/tests/border/fill_full.cc (revision 1565)
@@ -0,0 +1,398 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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/border_fill/test_border_fill_image2d_1.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/level/fill.hh>
+#include <mln/core/image1d.hh>
+#include <mln/core/image2d.hh>
+#include <mln/core/image3d.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/value/int_u16.hh>
+#include <mln/value/int_s8.hh>
+#include <mln/value/int_s16.hh>
+#include <mln/value/rgb8.hh>
+#include <mln/value/rgb16.hh>
+#include <mln/value/float01_8.hh>
+#include <mln/value/float01_16.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+
+template <typename T>
+int
+check1d(unsigned row, unsigned border, T& value, T& v)
+{
+ image1d<T> ima(row, border);
+ level::fill (ima, v);
+ border::fill (ima, value);
+
+ unsigned i = 0;
+ for(i = 0; i < border; ++i)
+ mln_assertion (ima[i] == value);
+ unsigned bo = border + row;
+ for(; i < bo; ++i)
+ mln_assertion (ima[i] == v);
+ bo += border;
+ for(; i < bo; ++i)
+ mln_assertion (ima[i] == value);
+}
+
+template <typename T>
+int
+check2d(unsigned row, unsigned col, unsigned border, T& value, T& v)
+{
+ image2d<T> ima(row, col, border);
+ level::fill (ima, v);
+ border::fill (ima, value);
+
+ unsigned c = col + 2 * border;
+ unsigned r = row + 2 * border;
+ unsigned bo = c * border + border;
+ unsigned i = 0;
+ unsigned u = col + border;
+ unsigned ww = r * c;
+
+ for(i = 0; i < bo; ++i)
+ mln_assertion (ima[i] == value);
+ bo += c * row;
+ for(; i < bo; ++i)
+ {
+ unsigned cur = i % c;
+ if (cur < border || cur >= u)
+ mln_assertion (ima[i] == value);
+ else
+ mln_assertion (ima[i] == v);
+ }
+ for(; i < ww; ++i)
+ mln_assertion (ima[i] == value);
+}
+
+template <typename T>
+int
+check3d(unsigned sli, unsigned row, unsigned col, unsigned border, T& value, T&
v)
+{
+ image3d<T> ima(sli, row, col, border);
+ level::fill (ima, v);
+ border::fill (ima, value);
+
+ unsigned c = col + 2 * border;
+ unsigned r = row + 2 * border;
+ unsigned bo = c * border + border;
+ unsigned i = 0;
+ unsigned u = col + border;
+ unsigned ww = r * c;
+
+ for(i = 0; i < bo; ++i)
+ mln_assertion (ima[i] == value);
+ bo += c * row;
+ for(; i < bo; ++i)
+ {
+ unsigned cur = i % c;
+ if (cur < border || cur >= u)
+ mln_assertion (ima[i] == value);
+ else
+ mln_assertion (ima[i] == v);
+ }
+ for(; i < ww; ++i)
+ mln_assertion (ima[i] == value);
+}
+
+
+int
+main (void)
+{
+ int limits = 10;
+
+ {
+ std::cerr << "Tests border::fill on int:" << std::endl;
+
+ typedef int T;
+ T value = (T) -1;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on unsigned:" << std::endl;
+
+ typedef unsigned T;
+ T value = (T) -1;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on int_u8 ... " << std::endl;
+
+ typedef value::int_u8 T;
+ T value = 255;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on int_u16 ... " <<
std::endl;
+
+ typedef value::int_u16 T;
+ T value = 65535;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on int_s8 ... " << std::endl;
+
+ typedef value::int_s8 T;
+ T value = 127;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on int_s16 ... " <<
std::endl;
+
+ typedef value::int_s16 T;
+ T value = 32767;
+ T v = 42;
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on rgb8 ... " << std::endl;
+
+ typedef value::rgb8 T;
+ T value = T(255, 255, 255);
+ T v = T(42, 0, 0);
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on rgb16:" << std::endl;
+
+ typedef value::rgb16 T;
+ T value = T(65535, 65535, 65535);
+ T v = T(42, 0, 0);
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+
+ {
+ std::cerr << "Tests border::fill on float01_8:" << std::endl;
+
+ typedef value::float01_8 T;
+ T value = T(0.9999);
+ T v = T(0.111);
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+ {
+ std::cerr << "Tests border::fill on float01_16:" << std::endl;
+
+ typedef value::float01_16 T;
+ T value = T(0.9999);
+ T v = T(0.111);
+
+ (std::cerr << "in 1d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ check1d(i, j, value, v);
+
+ std::cerr << "OK" << std::endl;
+
+
+ (std::cerr << "in 2d ... ").flush ();
+
+ for (int i = 1; i < limits; ++i)
+ for (int j = 1; j < limits; ++j)
+ for (int k = 1; k < limits; ++k)
+ check2d(i, j, k, value, v);
+
+ std::cerr << "OK" << std::endl;
+ }
+
+
+}
Index: trunk/milena/tests/border/duplicate.cc
===================================================================
--- trunk/milena/tests/border/duplicate.cc (revision 1564)
+++ trunk/milena/tests/border/duplicate.cc (revision 1565)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/border_duplicate/test_border_duplicate_image2d_1.cc
+/*! \file tests/border/duplicate.cc
*
* \brief Tests on mln::border::duplicate.
*/