URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-10-01 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Move tests for border in tests.
Tests for border fill.
* border_fill: New.
* border_fill/test_border_fill_image1d_1.cc: New.
* border_fill/test_border_fill_image1d_2.cc: New.
* border_fill/test_border_fill_image1d_3.cc: New.
* border_fill/test_border_fill_image1d_4.cc: New.
* border_fill/test_border_fill_image1d_5.cc: New.
* border_fill/test_border_fill_image2d_1.cc: New.
* border_fill/test_border_fill_image2d_2.cc: New.
* border_fill/test_border_fill_image2d_3.cc: New.
* border_fill/test_border_fill_image2d_4.cc: New.
* border_fill/test_border_fill_image3d_1.cc: New.
* border_fill/test_border_fill_image3d_2.cc: New.
* border_fill/test_border_fill_image3d_3.cc: New.
* border_fill/test_border_fill_image3d_4.cc: New.
Tests for border duplicate.
* border_duplicate: New.
* border_duplicate/test_border_duplicate_image1d_1.cc: New.
* border_duplicate/test_border_duplicate_image1d_2.cc: New.
* border_duplicate/test_border_duplicate_image1d_3.cc: New.
* border_duplicate/test_border_duplicate_image1d_4.cc: New.
* border_duplicate/test_border_duplicate_image1d_5.cc: New.
* border_duplicate/test_border_duplicate_image2d_1.cc: New.
* border_duplicate/test_border_duplicate_image2d_2.cc: New.
* border_duplicate/test_border_duplicate_image2d_3.cc: New.
* border_duplicate/test_border_duplicate_image2d_4.cc: New.
* border_duplicate/test_border_duplicate_image3d_1.cc: New.
* border_duplicate/test_border_duplicate_image3d_2.cc: New.
* border_duplicate/test_border_duplicate_image3d_3.cc: New.
* border_duplicate/test_border_duplicate_image3d_4.cc: New.
---
border_duplicate/test_border_duplicate_image1d_1.cc | 54 ++++++++++++++++++
border_duplicate/test_border_duplicate_image1d_2.cc | 53 ++++++++++++++++++
border_duplicate/test_border_duplicate_image1d_3.cc | 57 ++++++++++++++++++++
border_duplicate/test_border_duplicate_image1d_4.cc | 56 +++++++++++++++++++
border_duplicate/test_border_duplicate_image1d_5.cc | 56 +++++++++++++++++++
border_duplicate/test_border_duplicate_image2d_1.cc | 54 ++++++++++++++++++
border_duplicate/test_border_duplicate_image2d_2.cc | 53 ++++++++++++++++++
border_duplicate/test_border_duplicate_image2d_3.cc | 54 ++++++++++++++++++
border_duplicate/test_border_duplicate_image2d_4.cc | 56 +++++++++++++++++++
border_duplicate/test_border_duplicate_image3d_1.cc | 53 ++++++++++++++++++
border_duplicate/test_border_duplicate_image3d_2.cc | 52 ++++++++++++++++++
border_duplicate/test_border_duplicate_image3d_3.cc | 56 +++++++++++++++++++
border_duplicate/test_border_duplicate_image3d_4.cc | 55 +++++++++++++++++++
border_fill/test_border_fill_image1d_1.cc | 51 +++++++++++++++++
border_fill/test_border_fill_image1d_2.cc | 50 +++++++++++++++++
border_fill/test_border_fill_image1d_3.cc | 54 ++++++++++++++++++
border_fill/test_border_fill_image1d_4.cc | 55 +++++++++++++++++++
border_fill/test_border_fill_image1d_5.cc | 54 ++++++++++++++++++
border_fill/test_border_fill_image2d_1.cc | 51 +++++++++++++++++
border_fill/test_border_fill_image2d_2.cc | 50 +++++++++++++++++
border_fill/test_border_fill_image2d_3.cc | 54 ++++++++++++++++++
border_fill/test_border_fill_image2d_4.cc | 54 ++++++++++++++++++
border_fill/test_border_fill_image3d_1.cc | 51 +++++++++++++++++
border_fill/test_border_fill_image3d_2.cc | 50 +++++++++++++++++
border_fill/test_border_fill_image3d_3.cc | 53 ++++++++++++++++++
border_fill/test_border_fill_image3d_4.cc | 53 ++++++++++++++++++
26 files changed, 1389 insertions(+)
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_1.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_1.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_1.cc (revision
1209)
@@ -0,0 +1,54 @@
+// 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/test_border_duplicate_image1d_1.cc
+ *
+ * \brief Tests on mln::border::duplicate.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 1d size=5 with border=3 in value::int_u8"
+ << std::endl
+ << std::endl;
+ image1d_b<value::int_u8> ima(5);
+ debug::iota (ima);
+ border::duplicate (ima);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_1.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_1.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_1.cc (revision
1209)
@@ -0,0 +1,54 @@
+// 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/test_border_duplicate_image2d_1.cc
+ *
+ * \brief Tests on mln::border::duplicate.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=5x2 with border=3 in value::int_u8"
+ << std::endl
+ << std::endl;
+ image2d_b<value::int_u8> ima(5, 2, 3);
+ debug::iota (ima);
+ border::duplicate (ima);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_2.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_2.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_2.cc (revision
1209)
@@ -0,0 +1,53 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 1d size=8 with border=3 in int"
+ << std::endl
+ << std::endl;
+ image1d_b<int> ima(8, 3);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_3.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_3.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_3.cc (revision
1209)
@@ -0,0 +1,57 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 1d size= box [2 .. 4] with border=6 in int"
+ << std::endl
+ << std::endl;
+
+ box1d b(make::point1d(2), make::point1d(4));
+ image1d_b<int> ima(b, 6);
+ debug::iota (ima);
+ border::duplicate (ima);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_1.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_1.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_1.cc (revision
1209)
@@ -0,0 +1,53 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/iota.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=2x3x1 in value::int_u8 with border=2"
+ << std::endl
+ << std::endl;
+ image3d_b<value::int_u8> ima(2, 3, 1, 2);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_2.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_2.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_2.cc (revision
1209)
@@ -0,0 +1,53 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=2x3 in int with border=2"
+ << std::endl
+ << std::endl;
+ image2d_b<int> i2(2, 3, 2);
+ debug::iota (i2);
+ border::duplicate (i2);
+ debug::println_with_border(i2);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_3.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_3.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_3.cc (revision
1209)
@@ -0,0 +1,54 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=[(2,6) .. (3,8)] with border=3 in int"
+ << std::endl
+ << std::endl;
+ box2d b(make::point2d(2, 6), make::point2d(3, 8));
+ image2d_b<int> ima(b, 3);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_2.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_2.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_2.cc (revision
1209)
@@ -0,0 +1,52 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/debug/iota.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=2x3x1 with border=1 in int"
+ << std::endl
+ << std::endl;
+ image3d_b<int> ima(2, 3, 1, 1);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_4.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_4.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_4.cc (revision
1209)
@@ -0,0 +1,56 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 1d size= box [-6 .. -3] with border=6 in value::int_u8"
+ << std::endl
+ << std::endl;
+
+ box1d b(make::point1d(-6), make::point1d(-3));
+ image1d_b<value::int_u8> ima(b, 6);
+ debug::iota (ima);
+ border::duplicate (ima);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_5.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_5.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image1d_5.cc (revision
1209)
@@ -0,0 +1,56 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 1d size= box [2 .. 4] with border=0 in int"
+ << std::endl
+ << std::endl;
+
+ box1d b(make::point1d(2), make::point1d(4));
+ image1d_b<int> ima(b, 0);
+ debug::iota (ima);
+ border::duplicate (ima);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_3.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_3.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_3.cc (revision
1209)
@@ -0,0 +1,56 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/iota.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=[(2,6,1) .. (3,8,3)] border=1 in value::int_u8"
+ << std::endl
+ << std::endl;
+
+ box3d b(make::point3d(2, 6, 1), make::point3d(3, 8, 3));
+ image3d_b<value::int_u8> ima(b, 1);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_4.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_4.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image2d_4.cc (revision
1209)
@@ -0,0 +1,56 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+#include <mln/debug/iota.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=[(-6,-3) .. (-2,-1)] with border=3 in
value::int_u8"
+ << std::endl
+ << std::endl;
+
+ box2d b(make::point2d(-6, -3), make::point2d(-2, -1));
+ image2d_b<value::int_u8> ima(b, 3);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_4.cc
===================================================================
--- trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_4.cc (revision 0)
+++ trunk/milena/tests/border_duplicate/test_border_duplicate_image3d_4.cc (revision
1209)
@@ -0,0 +1,55 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+
+#include <mln/border/duplicate.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/debug/iota.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=[(-7,-8,-6) .. (-5,-4,-1 )] border=1 in int"
+ << std::endl
+ << std::endl;
+
+ box3d b(make::point3d(-7, -8, -6), make::point3d(-5, -4, -1));
+ image3d_b<int> ima(b, 1);
+ debug::iota (ima);
+ border::duplicate (ima);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image2d_2.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image2d_2.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image2d_2.cc (revision 1209)
@@ -0,0 +1,50 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=2x3 in int"
+ << std::endl
+ << std::endl;
+ image2d_b<int> i2(2, 3);
+ border::fill (i2, 5);
+ debug::println_with_border(i2);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image1d_3.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image1d_3.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image1d_3.cc (revision 1209)
@@ -0,0 +1,54 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/core/image1d_b.hh>
+#include <mln/border/fill.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl;
+ std::cout << "Test 1d size= box [2 .. 4] with border=6 in int"
+ << std::endl;
+
+ box1d b(make::point1d(2), make::point1d(4));
+ image1d_b<int> ima(b, 6);
+
+ border::fill (ima, 9);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image3d_1.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image3d_1.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image3d_1.cc (revision 1209)
@@ -0,0 +1,51 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/debug/println_with_border.hh>
+#include <mln/border/fill.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/value/int_u8.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=2x3x1 in value::int_u8"
+ << std::endl
+ << std::endl;
+ image3d_b<value::int_u8> i4(2, 3, 1, 2);
+ border::fill (i4, 7);
+ debug::println_with_border(i4);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image3d_2.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image3d_2.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image3d_2.cc (revision 1209)
@@ -0,0 +1,50 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/core/image3d_b.hh>
+#include <mln/border/fill.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=2x3x1 with border=1 in int"
+ << std::endl
+ << std::endl;
+ image3d_b<int> i3(2, 3, 1, 1);
+ border::fill (i3, 6);
+ debug::println_with_border(i3);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image1d_4.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image1d_4.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image1d_4.cc (revision 1209)
@@ -0,0 +1,55 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/core/image1d_b.hh>
+#include <mln/border/fill.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl;
+ std::cout << "Test 1d size= box [-6 .. -3] with border=6 in
value::int_u8"
+ << std::endl;
+
+ box1d b(make::point1d(-6), make::point1d(-3));
+ image1d_b<value::int_u8> ima(b, 6);
+
+// image1d_b<value::int_u8> ima(5);
+ border::fill (ima, 7);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image2d_3.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image2d_3.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image2d_3.cc (revision 1209)
@@ -0,0 +1,54 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=[(2,6) .. (3,8)] with border=3 in int"
+ << std::endl
+ << std::endl;
+
+ box2d b(make::point2d(2, 6), make::point2d(3, 8));
+ image2d_b<int> ima(b, 3);
+
+ border::fill (ima, 8);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image2d_4.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image2d_4.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image2d_4.cc (revision 1209)
@@ -0,0 +1,54 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=[(-6,-3) .. (-2,-1)] with border=3 in
value::int_u8"
+ << std::endl
+ << std::endl;
+
+ box2d b(make::point2d(-6, -3), make::point2d(-2, -1));
+ image2d_b<value::int_u8> ima(b, 3);
+
+ border::fill (ima, 3);
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image1d_5.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image1d_5.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image1d_5.cc (revision 1209)
@@ -0,0 +1,54 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/core/image1d_b.hh>
+#include <mln/border/fill.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl;
+ std::cout << "Test 1d size= box [2 .. 4] with border=0 in int"
+ << std::endl;
+
+ box1d b(make::point1d(2), make::point1d(4));
+ image1d_b<int> ima(b, 0);
+
+ border::fill (ima, 9);
+ std::cout << std::endl;
+ debug::println_with_border(ima);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image3d_3.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image3d_3.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image3d_3.cc (revision 1209)
@@ -0,0 +1,53 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=[(2,6,1) .. (3,8,3)] border=1 in value::int_u8"
+ << std::endl
+ << std::endl;
+
+ box3d b(make::point3d(2, 6, 1), make::point3d(3, 8, 3));
+ image3d_b<value::int_u8> i4(b, 1);
+ border::fill (i4, 2);
+ debug::println_with_border(i4);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image3d_4.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image3d_4.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image3d_4.cc (revision 1209)
@@ -0,0 +1,53 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+
+#include <mln/border/fill.hh>
+#include <mln/core/image3d_b.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 3d size=[(-7,-8,-6) .. (-5,-4,-1 )] border=1 in int"
+ << std::endl
+ << std::endl;
+
+ box3d b(make::point3d(-7, -8, -6), make::point3d(-5, -4, -1));
+ image3d_b<int> i4(b, 1);
+ border::fill (i4, 2);
+ debug::println_with_border(i4);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image1d_1.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image1d_1.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image1d_1.cc (revision 1209)
@@ -0,0 +1,51 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl;
+ std::cout << "Test 1d size=5 with border=3 in value::int_u8"
+ << std::endl;
+ image1d_b<value::int_u8> i6(5);
+ border::fill (i6, 9);
+ std::cout << std::endl;
+ debug::println_with_border(i6);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image2d_1.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image2d_1.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image2d_1.cc (revision 1209)
@@ -0,0 +1,51 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image2d_b.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl
+ << "Test 2d size=2x3 in value::int_u8"
+ << std::endl
+ << std::endl;
+ image2d_b<value::int_u8> i1(2, 3);
+ border::fill (i1, 8);
+ debug::println_with_border(i1);
+ std::cout << std::endl;
+}
Index: trunk/milena/tests/border_fill/test_border_fill_image1d_2.cc
===================================================================
--- trunk/milena/tests/border_fill/test_border_fill_image1d_2.cc (revision 0)
+++ trunk/milena/tests/border_fill/test_border_fill_image1d_2.cc (revision 1209)
@@ -0,0 +1,50 @@
+// 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.cc
+ *
+ * \brief Tests on mln::border::fill.
+ */
+
+#include <mln/border/fill.hh>
+#include <mln/core/image1d_b.hh>
+#include <mln/debug/println_with_border.hh>
+
+using namespace mln;
+
+int
+main (void)
+{
+ std::cout << std::endl;
+ std::cout << "Test 1d size=8 with border=3 in int"
+ << std::endl;
+ std::cout << std::endl;
+ image1d_b<int> i5(8);
+ border::fill (i5, 1);
+ debug::println_with_border(i5);
+ std::cout << std::endl;
+}