URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Move accu's tests into accu directory.
* tests/accu/all.cc: Rename as...
* tests/accu_all.cc: ...this.
* tests/accu/min.cc: Rename as...
* tests/accu_min.cc: ...this.
* tests/accu/nil.cc: Rename as...
* tests/accu_nil.cc: ...this.
---
all.cc | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
min.cc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
nil.cc | 46 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 164 insertions(+)
Index: trunk/milena/tests/accu_nil.cc (deleted)
===================================================================
Index: trunk/milena/tests/accu_min.cc (deleted)
===================================================================
Index: trunk/milena/tests/accu_all.cc (deleted)
===================================================================
Index: trunk/milena/tests/accu/nil.cc
===================================================================
--- trunk/milena/tests/accu/nil.cc (revision 0)
+++ trunk/milena/tests/accu/nil.cc (revision 1533)
@@ -0,0 +1,46 @@
+// 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/accu/nil.cc
+ *
+ * \brief Tests on mln::accu::nil.
+ */
+
+#include <mln/core/image2d.hh>
+#include <mln/value/int_u8.hh>
+
+#include <mln/accu/nil.hh>
+#include <mln/level/compute.hh>
+
+
+int main()
+{
+ using namespace mln;
+ image2d<value::int_u8> ima(3, 3);
+ accu::nil a;
+ level::compute<accu::nil>(ima);
+}
Index: trunk/milena/tests/accu/min.cc
===================================================================
--- trunk/milena/tests/accu/min.cc (revision 0)
+++ trunk/milena/tests/accu/min.cc (revision 1533)
@@ -0,0 +1,62 @@
+// 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/accu/min.cc
+ *
+ * \brief Tests on mln::accu::min.
+ */
+
+#include <mln/core/image2d.hh>
+#include <mln/debug/iota.hh>
+
+#include <mln/accu/nil.hh>
+#include <mln/accu/min.hh>
+#include <mln/accu/p.hh>
+#include <mln/accu/v.hh>
+#include <mln/accu/compute.hh>
+
+#include <mln/level/compute.hh>
+
+
+int main()
+{
+ using namespace mln;
+ image2d<int> ima(3, 3);
+ debug::iota(ima);
+ mln_assertion(level::compute< accu::min >(ima) == 1);
+ mln_assertion(level::compute< accu::min_<int> >(ima) == 1);
+
+// accu::compute< accu::nil >(ima); // No-op.
+
+// accu::compute< accu::min >(ima);
+
+ std::cout << accu::compute< accu::val<accu::min> >(ima)
+ << std::endl;
+
+// std::cout << accu::compute< accu::min >(ima)
+// << std::endl;
+}
Index: trunk/milena/tests/accu/all.cc
===================================================================
--- trunk/milena/tests/accu/all.cc (revision 0)
+++ trunk/milena/tests/accu/all.cc (revision 1533)
@@ -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/accu/all.cc
+ *
+ * \brief Tests on all files in mln/accu.
+ */
+
+#include <mln/accu/all.hh>
+#include <mln/core/point2d.hh>
+#include <mln/value/set.hh>
+
+
+int main()
+{
+ using namespace mln;
+ using namespace mln::accu;
+
+
+ bbox<point2d> b;
+ count_<int> c;
+ histo< value::set<bool> > h;
+ max_<int> ma;
+ mean_<int> me;
+ // median< value::set<bool> > med; // FIXME: bool has no min so
workaround!
+ min_<int> mi;
+ // min_h< value::set<bool> > mh; // OK: do not work since bool has no
min/max :)
+ min_max_<int> mm;
+ nil n;
+ pair_< min_<int>, max_<int> > p;
+ sum_<int> s;
+}