* tests/draw/line.cc: Remove a useless header inclusion.
Add a description.
Stylistic changes.
---
milena/ChangeLog | 8 ++++++++
milena/tests/draw/line.cc | 17 ++++++++---------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e9e9079..6205059 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,11 @@
+2013-07-29 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Clean up Milena's tests/draw/line.cc.
+
+ * tests/draw/line.cc: Remove a useless header inclusion.
+ Add a description.
+ Stylistic changes.
+
2013-07-25 Roland Levillain <roland(a)lrde.epita.fr>
Remove an inadvertently added file.
diff --git a/milena/tests/draw/line.cc b/milena/tests/draw/line.cc
index 7aad959..82ffb6d 100644
--- a/milena/tests/draw/line.cc
+++ b/milena/tests/draw/line.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -23,39 +24,37 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#include <iterator>
+/// \file
+/// \brief Exercise mln::draw::line.
#include <mln/core/image/image2d.hh>
#include <mln/core/image/dmorph/sub_image.hh>
-
#include <mln/data/fill.hh>
#include <mln/data/compare.hh>
#include <mln/draw/line.hh>
#include <mln/debug/println.hh>
-
int main()
{
using namespace mln;
- point2d b = point2d(0,0), e = point2d(6,9);
- p_line2d l(b, e);
+ point2d p1 = point2d(0,0);
+ point2d p2 = point2d(6,9);
+ p_line2d l(p1, p2);
mln_assertion(l.nsites() == 10);
image2d<bool> ima(10,10);
data::fill(ima, false);
- draw::line(ima, b, e, true);
+ draw::line(ima, p1, p2, true);
image2d<bool> ima2(10,10);
data::fill(ima2, false);
data::paste(pw::cst(true) | l, ima2);
-
mln_assertion(ima2 == ima);
image2d<bool> ima3(10,10);
data::fill(ima3, false);
data::fill((ima3 | l).rw(), true);
-
mln_assertion(ima3 == ima);
}
--
1.7.10.4
Show replies by date