* tests/global_vars1.cc,
* tests/global_vars2.cc: check potential global symbols duplications.
---
milena/ChangeLog | 7 +++
milena/tests/global_vars1.cc | 88 +++++++++---------------------------------
milena/tests/global_vars2.cc | 79 +++++---------------------------------
3 files changed, 36 insertions(+), 138 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 660fcb1..33aa88c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,4 +1,11 @@
2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Improve global_vars test.
+
+ * tests/global_vars1.cc,
+ * tests/global_vars2.cc: check potential global symbols duplications.
+
+2009-05-28 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
Add a pretty_check target for tests.
diff --git a/milena/tests/global_vars1.cc b/milena/tests/global_vars1.cc
index c36f76f..8495acd 100644
--- a/milena/tests/global_vars1.cc
+++ b/milena/tests/global_vars1.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 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
@@ -29,77 +30,26 @@
///
/// Tests proper global variable declarations
-#include <mln/util/all.hh>
-#include <mln/fun/p2v/all.hh>
-#include <mln/fun/x2x/all.hh>
-#include <mln/fun/v2v/all.hh>
-#include <mln/fun/i2v/all.hh>
-#include <mln/fun/all.hh>
-#include <mln/fun/x2v/all.hh>
-#include <mln/fun/p2b/all.hh>
-#include <mln/extension/all.hh>
-#include <mln/histo/all.hh>
-#include <mln/trait/op/all.hh>
-#include <mln/trait/all.hh>
-#include <mln/trait/value/all.hh>
-#include <mln/win/all.hh>
-#include <mln/core/routine/all.hh>
-#include <mln/core/trait/all.hh>
-#include <mln/core/def/all.hh>
-#include <mln/core/internal/check/image_all.hh>
-#include <mln/core/image/all.hh>
-#include <mln/core/site_set/all.hh>
-#include <mln/io/pbm/all.hh>
-#include <mln/io/pfm/all.hh>
-#include <mln/io/pgm/all.hh>
-#include <mln/io/all.hh>
-#include <mln/io/fits/all.hh>
-#include <mln/io/pnm/all.hh>
-#include <mln/io/ppm/all.hh>
-#include <mln/make/all.hh>
-#include <mln/canvas/morpho/all.hh>
-#include <mln/canvas/all.hh>
-#include <mln/canvas/browsing/all.hh>
-#include <mln/estim/all.hh>
-#include <mln/arith/all.hh>
-#include <mln/display/all.hh>
-#include <mln/test/all.hh>
-#include <mln/border/all.hh>
-#include <mln/trace/all.hh>
-#include <mln/debug/all.hh>
-#include <mln/morpho/elementary/all.hh>
-#include <mln/morpho/all.hh>
-#include <mln/accu/all.hh>
-#include <mln/pw/all.hh>
-#include <mln/linear/all.hh>
-#include <mln/metal/all.hh>
-#include <mln/metal/math/all.hh>
-#include <mln/set/all.hh>
-#include <mln/convert/impl/all.hh>
-#include <mln/convert/all.hh>
-#include <mln/geom/all.hh>
-#include <mln/literal/all.hh>
-#include <mln/level/approx/all.hh>
-#include <mln/level/all.hh>
-#include <mln/level/naive/all.hh>
-#include <mln/math/all.hh>
-#include <mln/norm/all.hh>
-#include <mln/logical/all.hh>
-#include <mln/draw/all.hh>
-#include <mln/value/builtin/all.hh>
-#include <mln/value/all.hh>
-#include <mln/value/internal/all.hh>
-#include <mln/value/concept/all.hh>
-#include <mln/tag/all.hh>
-#include <mln/labeling/all.hh>
-
-#include <mln/essential/1d.hh>
-#include <mln/essential/2d.hh>
-#include <mln/essential/3d.hh>
+#include <mln/all.hh>
int f1();
+int f2();
int main ()
{
- f1();
+ {
+ int b1 = 10;
+
+ mln::border::thickness = b1;
+ int b2 = f1();
+
+ mln_assertion(b1 == b2);
+ }
+
+ {
+ mln::border::thickness = 4;
+ f2();
+
+ mln_assertion(mln::border::thickness == 2);
+ }
}
diff --git a/milena/tests/global_vars2.cc b/milena/tests/global_vars2.cc
index b9d94eb..5071788 100644
--- a/milena/tests/global_vars2.cc
+++ b/milena/tests/global_vars2.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 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
@@ -31,75 +32,15 @@
# define MLN_INCLUDE_ONLY
-#include <mln/util/all.hh>
-#include <mln/fun/p2v/all.hh>
-#include <mln/fun/x2x/all.hh>
-#include <mln/fun/v2v/all.hh>
-#include <mln/fun/i2v/all.hh>
-#include <mln/fun/all.hh>
-#include <mln/fun/x2v/all.hh>
-#include <mln/fun/p2b/all.hh>
-#include <mln/extension/all.hh>
-#include <mln/histo/all.hh>
-#include <mln/trait/op/all.hh>
-#include <mln/trait/all.hh>
-#include <mln/trait/value/all.hh>
-#include <mln/win/all.hh>
-#include <mln/core/routine/all.hh>
-#include <mln/core/trait/all.hh>
-#include <mln/core/def/all.hh>
-#include <mln/core/internal/check/image_all.hh>
-#include <mln/core/image/all.hh>
-#include <mln/core/site_set/all.hh>
-#include <mln/io/pbm/all.hh>
-#include <mln/io/pfm/all.hh>
-#include <mln/io/pgm/all.hh>
-#include <mln/io/all.hh>
-#include <mln/io/fits/all.hh>
-#include <mln/io/pnm/all.hh>
-#include <mln/io/ppm/all.hh>
-#include <mln/make/all.hh>
-#include <mln/canvas/morpho/all.hh>
-#include <mln/canvas/all.hh>
-#include <mln/canvas/browsing/all.hh>
-#include <mln/estim/all.hh>
-#include <mln/arith/all.hh>
-#include <mln/display/all.hh>
-#include <mln/test/all.hh>
-#include <mln/border/all.hh>
-#include <mln/trace/all.hh>
-#include <mln/debug/all.hh>
-#include <mln/morpho/elementary/all.hh>
-#include <mln/morpho/all.hh>
-#include <mln/accu/all.hh>
-#include <mln/pw/all.hh>
-#include <mln/linear/all.hh>
-#include <mln/metal/all.hh>
-#include <mln/metal/math/all.hh>
-#include <mln/set/all.hh>
-#include <mln/convert/impl/all.hh>
-#include <mln/convert/all.hh>
-#include <mln/geom/all.hh>
-#include <mln/literal/all.hh>
-#include <mln/level/approx/all.hh>
-#include <mln/level/all.hh>
-#include <mln/level/naive/all.hh>
-#include <mln/math/all.hh>
-#include <mln/norm/all.hh>
-#include <mln/logical/all.hh>
-#include <mln/draw/all.hh>
-#include <mln/value/builtin/all.hh>
-#include <mln/value/all.hh>
-#include <mln/value/internal/all.hh>
-#include <mln/value/concept/all.hh>
-#include <mln/tag/all.hh>
-#include <mln/labeling/all.hh>
-
-#include <mln/essential/1d.hh>
-#include <mln/essential/2d.hh>
-#include <mln/essential/3d.hh>
+#include <mln/all.hh>
int f1 ()
{
- return 0;
+ return mln::border::thickness;
+}
+
+
+void f2 ()
+{
+ mln::border::thickness = 2;
}
--
1.5.6.5
Show replies by date