https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix some extra tests.
* mln/display/remove.hh,
* mln/display/save.hh: Rename as...
* trash/display_remove.hh: ...this and...
* trash/display_save.hh: ...this.
* tests/display/all_headers.cc: Upgrade doc style.
* mln/display/all.hh: Update.
* tests/algebra/vec.cc: Fix.
* tests/morpho/erosion.cc: Cleanup.
Extra tests on specializations are performed by general.cc.
mln/display/all.hh | 16 ++-----
tests/algebra/vec.cc | 13 +++---
tests/display/all_headers.cc | 10 ++--
tests/morpho/erosion.cc | 93 +++++--------------------------------------
trash/display_remove.hh | 26 +++++-------
5 files changed, 40 insertions(+), 118 deletions(-)
Index: trash/display_remove.hh
--- trash/display_remove.hh (revision 2992)
+++ trash/display_remove.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,18 +29,14 @@
#ifndef MLN_DISPLAY_REMOVE_HH
# define MLN_DISPLAY_REMOVE_HH
-/*! \file mln/display/remove.hh
- *
- * \brief Remove all temporary files create by display::save.
- *
- */
-
-# include <mln/trait/image_from_grid.hh>
-# include <mln/core/image/image_if.hh>
-# include <mln/core/image/image2d.hh>
-# include <mln/display/save.hh>
+/// \file mln/display/remove.hh
+///
+/// Remove all temporary files create by display::save.
# include <map>
+# include <string>
+# include <mln/trace/all.hh>
+
namespace mln
{
@@ -47,12 +44,11 @@
namespace display
{
- /*! Remove all temporary images which are created by the routine
- * save.
- *
- */
+ /// Remove all temporary images which are created by the routine
+ /// save.
void remove();
+
# ifndef MLN_INCLUDE_ONLY
namespace impl
Property changes on: trash/display_remove.hh
___________________________________________________________________
Added: svn:mergeinfo
Property changes on: trash/display_save.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/algebra/vec.cc
--- tests/algebra/vec.cc (revision 2993)
+++ tests/algebra/vec.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/algebra/vec.cc
- *
- * \brief Test on mln::algebra::vec.
- */
+/// \file tests/algebra/vec.cc
+///
+/// Test on mln::algebra::vec.
#include <mln/algebra/vec.hh>
#include <mln/value/int_u8.hh>
@@ -49,5 +49,6 @@
value::int_u8 i = 3;
mln_assertion((i * v_f) == (value::scalar(i) * v_f));
- mln_assertion((literal::zero + v_f) == v_f);
+ algebra::vec<3,float> O = literal::zero;
+ mln_assertion((O + v_f) == v_f);
}
Index: tests/morpho/erosion.cc
--- tests/morpho/erosion.cc (revision 2993)
+++ tests/morpho/erosion.cc (working copy)
@@ -51,91 +51,20 @@
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
win::rectangle2d rec(21, 21);
- win::hline2d hline(31);
- win::vline2d vline(31);
- win::diag2d diag2d(31);
- win::backdiag2d backdiag2d(31);
- win::octagon2d oct(6 * 3 + 1);
- image2d<int_u8> out;
- image2d<int_u8> ref;
-
-
-// trace::quiet = false;
-
-
- // Rectangle
-
- {
- ref = morpho::impl::generic::erosion_on_function(lena, rec);
-
- out = morpho::erosion(lena, rec);
- mln_assertion(out == ref);
-
- out = morpho::impl::erosion_arbitrary_2d(lena, rec);
- mln_assertion(out == ref);
- }
-
-
- // Hline
-
- {
- ref = morpho::impl::generic::erosion_on_function(lena, hline);
-
- out = morpho::erosion(lena, hline);
- mln_assertion(out == ref);
-
- out = morpho::impl::erosion_arbitrary_2d(lena, hline);
- mln_assertion(out == ref);
- }
-
-
- // Vline
-
- {
- ref = morpho::impl::generic::erosion_on_function(lena, vline);
-
- out = morpho::erosion(lena, vline);
- mln_assertion(out == ref);
-
- out = morpho::impl::erosion_arbitrary_2d(lena, vline);
- mln_assertion(out == ref);
- }
-
-
- // Diag2d
-
- {
- ref = morpho::impl::generic::erosion_on_function(lena, diag2d);
-
- out = morpho::erosion(lena, diag2d);
- mln_assertion(out == ref);
-
- out = morpho::impl::erosion_arbitrary_2d(lena, diag2d);
- mln_assertion(out == ref);
- }
-
-
- // Backdiag2d
-
- {
- ref = morpho::impl::generic::erosion_on_function(lena, backdiag2d);
-
- out = morpho::erosion(lena, backdiag2d);
- mln_assertion(out == ref);
-
- out = morpho::impl::erosion_arbitrary_2d(lena, backdiag2d);
- mln_assertion(out == ref);
- }
+ morpho::erosion(lena, rec);
+ win::hline2d hline(31);
+ morpho::erosion(lena, hline);
+ win::vline2d vline(31);
+ morpho::erosion(lena, vline);
- // Octagon
+ win::diag2d diag2d(31);
+ morpho::erosion(lena, diag2d);
- {
- ref = morpho::impl::generic::erosion_on_function(lena, oct);
- // io::pgm::save(ref, "out_oct_ref.pgm");
- out = morpho::erosion(lena, oct);
- mln_assertion(out == ref);
- }
+ win::backdiag2d backdiag2d(31);
+ morpho::erosion(lena, backdiag2d);
+ win::octagon2d oct(6 * 3 + 1);
+ morpho::erosion(lena, oct);
}
Index: tests/display/all_headers.cc
--- tests/display/all_headers.cc (revision 2993)
+++ tests/display/all_headers.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/display/all_headers.cc
- *
- * \brief Tests on mln::display.
- */
+/// \file tests/display/all_headers.cc
+///
+/// Tests on mln::display.
#include <mln/display/all.hh>
Index: mln/display/all.hh
--- mln/display/all.hh (revision 2993)
+++ mln/display/all.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_DISPLAY_ALL_HH
# define MLN_DISPLAY_ALL_HH
-/*! \file mln/display/all.hh
- *
- * \brief File that includes all display routines.
- */
+/// \file mln/display/all.hh
+///
+/// File that includes all display routines.
namespace mln
@@ -52,10 +52,6 @@
}
-# include <mln/display/color_pretty.hh>
-# include <mln/display/remove.hh>
-# include <mln/display/save_and_show.hh>
-# include <mln/display/save.hh>
-# include <mln/display/show.hh>
+
#endif // ! MLN_DISPLAY_ALL_HH