3461: Print dimension in op<<(win::ball).

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Print dimension in op<<(win::ball). * mln/win/ball.hh (print_): Print dimension. * tests/win/ball.cc: Inactivate echo. mln/win/ball.hh | 2 +- tests/win/ball.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) Index: mln/win/ball.hh --- mln/win/ball.hh (revision 3460) +++ mln/win/ball.hh (working copy) @@ -136,7 +136,7 @@ void ball<G,C>::print_(std::ostream& ostr) const { - ostr << "[ball: diameter=" << diameter_ << ']'; + ostr << "[" << G::dim << "D ball: diameter=" << diameter_ << ']'; } # endif // ! MLN_INCLUDE_ONLY Index: tests/win/ball.cc --- tests/win/ball.cc (revision 3460) +++ tests/win/ball.cc (working copy) @@ -30,6 +30,7 @@ /// Tests on mln::win::ball. #include <mln/win/ball.hh> + #include <mln/convert/to_image.hh> #include <mln/debug/println.hh> @@ -41,8 +42,11 @@ win::ball<grid::square, def::coord> b(7); mln_assertion(b.delta() == 3); mln_assertion(b.size() == 29); + mln_assertion(b.diameter() == 7); + + // std::cout << b << std::endl; - debug::println(convert::to_image(b)); + // debug::println(convert::to_image(b)); // - - - | - - - // - | | | | | - // - | | | | | -
participants (1)
-
Thierry Geraud