Index: ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* tests/core/tests/piter1d: Add test for 1D forward point iterators.
* tests/core/tests/piter2d: Add test for 2D forward point iterators.
* tests/core/tests/piter3d: Add test for 3D forward point iterators.
piter1d | 29 +++++++++++++++++++++++++++++
piter2d | 29 +++++++++++++++++++++++++++++
piter3d | 29 +++++++++++++++++++++++++++++
3 files changed, 87 insertions(+)
Index: tests/core/tests/piter1d
--- tests/core/tests/piter1d (revision 0)
+++ tests/core/tests/piter1d (revision 0)
@@ -0,0 +1,29 @@
+
+#include <iostream>
+
+#include <ntg/all.hh>
+#include <oln/basics1d.hh>
+
+#include "check.hh"
+#include "data.hh"
+
+
+
+
+bool check()
+{
+ oln::image1d<int> ima(10);
+ int cpt = 0;
+
+ oln::fwd_piter1d it(ima.size());
+ for_all (it)
+ {
+ ima[it] = 0;
+ cpt++;
+ }
+
+ if (cpt != 10)
+ return true;
+
+ return false;
+}
Index: tests/core/tests/piter2d
--- tests/core/tests/piter2d (revision 0)
+++ tests/core/tests/piter2d (revision 0)
@@ -0,0 +1,29 @@
+
+#include <iostream>
+
+#include <ntg/all.hh>
+#include <oln/basics2d.hh>
+
+#include "check.hh"
+#include "data.hh"
+
+
+
+
+bool check()
+{
+ oln::image2d<int> ima(10, 10);
+ int cpt = 0;
+
+ oln::fwd_piter2d it(ima.size());
+ for_all (it)
+ {
+ ima[it] = 0;
+ cpt++;
+ }
+
+ if (cpt != 100)
+ return true;
+
+ return false;
+}
Index: tests/core/tests/piter3d
--- tests/core/tests/piter3d (revision 0)
+++ tests/core/tests/piter3d (revision 0)
@@ -0,0 +1,29 @@
+
+#include <iostream>
+
+#include <ntg/all.hh>
+#include <oln/basics3d.hh>
+
+#include "check.hh"
+#include "data.hh"
+
+
+
+
+bool check()
+{
+ oln::image3d<int> ima(10, 10, 10);
+ int cpt = 0;
+
+ oln::fwd_piter3d it(ima.size());
+ for_all (it)
+ {
+ ima[it] = 0;
+ cpt++;
+ }
+
+ if (cpt != 1000)
+ return true;
+
+ return false;
+}