From: levill_r <levill_r@4aad255d-cdde-0310-9447-f3009e2ae8c0>
* configure.ac (OLENA_PROTO_STL_STYLE): Remove variable.
(MILENA_DIR): New variable.
* src/config.hh.in (OLENA_PROTO_STL_STYLE): Remove macro.
(MILENA_DIR): New macro.
* test/test_olena.cc: Convert this test to Milena's interface.
Fill the very first image with 0 before printing it.
git-svn-id:
https://svn.lrde.epita.fr/svn/oln/trunk@4651
4aad255d-cdde-0310-9447-f3009e2ae8c0
---
dynamic-use-of-static-c++/ChangeLog | 11 +++++++++++
dynamic-use-of-static-c++/configure.ac | 5 +++--
dynamic-use-of-static-c++/src/config.hh.in | 2 +-
dynamic-use-of-static-c++/test/test_olena.cc | 21 +++++++++++++--------
4 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/dynamic-use-of-static-c++/ChangeLog b/dynamic-use-of-static-c++/ChangeLog
index 532056e..469d2b7 100644
--- a/dynamic-use-of-static-c++/ChangeLog
+++ b/dynamic-use-of-static-c++/ChangeLog
@@ -1,5 +1,16 @@
2009-10-14 Roland Levillain <roland(a)lrde.epita.fr>
+ Convert the test on Olena from proto-stl-style to Milena.
+
+ * configure.ac (OLENA_PROTO_STL_STYLE): Remove variable.
+ (MILENA_DIR): New variable.
+ * src/config.hh.in (OLENA_PROTO_STL_STYLE): Remove macro.
+ (MILENA_DIR): New macro.
+ * test/test_olena.cc: Convert this test to Milena's interface.
+ Fill the very first image with 0 before printing it.
+
+2009-10-14 Roland Levillain <roland(a)lrde.epita.fr>
+
Disable colored outputs for now.
* src/function_loader.cc (dyn::function_loader_t::load): Here.
diff --git a/dynamic-use-of-static-c++/configure.ac
b/dynamic-use-of-static-c++/configure.ac
index 3298a22..1ecd36c 100644
--- a/dynamic-use-of-static-c++/configure.ac
+++ b/dynamic-use-of-static-c++/configure.ac
@@ -102,6 +102,7 @@ dnl fi
dnl AC_MSG_RESULT([$has_swig])
+# FIXME: Doesn't Autoconf provide something like abs_top_srcdir?
my_abs_srcdir=`cd $srcdir && pwd`
# FIXME: Remove me when function_loader will be pure C++
@@ -109,8 +110,8 @@ AC_SUBST([DYNDIR], [$my_abs_srcdir/src])
AC_SUBST([DYN_FIXTURES], [$my_abs_srcdir/test/fixtures])
-# Make the proper link to the olena-proto-stl-style in test
-AC_SUBST([OLENA_PROTO_STL_STYLE], [$my_abs_srcdir/test/olena/proto-stl-style])
+# Absolute path to Milena.
+AC_SUBST([MILENA_DIR], [$my_abs_srcdir/../milena])
AC_SUBST([LIBERTYARG],
$my_abs_srcdir/$(ERB([lib/libiberty-<%= RUBY_PLATFORM %>.la])))
diff --git a/dynamic-use-of-static-c++/src/config.hh.in
b/dynamic-use-of-static-c++/src/config.hh.in
index 9165c7c..7dbbbb0 100644
--- a/dynamic-use-of-static-c++/src/config.hh.in
+++ b/dynamic-use-of-static-c++/src/config.hh.in
@@ -1,3 +1,3 @@
#define DYNDIR "@DYNDIR@"
#define DYN_FIXTURES "@DYN_FIXTURES@"
-#define OLENA_PROTO_STL_STYLE "@OLENA_PROTO_STL_STYLE@"
+#define MILENA_DIR "@MILENA_DIR@"
diff --git a/dynamic-use-of-static-c++/test/test_olena.cc
b/dynamic-use-of-static-c++/test/test_olena.cc
index d814767..3c5dd74 100644
--- a/dynamic-use-of-static-c++/test/test_olena.cc
+++ b/dynamic-use-of-static-c++/test/test_olena.cc
@@ -1,21 +1,26 @@
#include "dyn-all.hh"
+
using namespace dyn::language;
int main()
{
- dyn::include_dir(OLENA_PROTO_STL_STYLE); // FIXME: Move it into
fixtures/olean-proto-stl-style
- // FIXME: Add
- dyn::include("all.hh");
+ dyn::include_dir(MILENA_DIR);
+ dyn::include("mln/core/image/image2d.hh");
+ dyn::include("mln/data/fill.hh");
+ dyn::include("mln/debug/iota.hh");
+ dyn::include("mln/debug/println.hh");
- fun iota("iota");
- fun println_2d("println_2d");
- ctor mk_image2d_int("image2d<int>");
+ ctor mk_image2d_int("mln::image2d<int>");
+ fun fill("mln::data::fill");
+ fun iota("mln::debug::iota");
+ fun println("mln::debug::println");
var ima = mk_image2d_int(3, 3);
- println_2d(std::cout, "ima_before=", ima);
+ fill(ima, 0);
+ println("ima_before=", ima);
iota(ima);
- println_2d(std::cout, "ima-after=", ima);
+ println("ima-after=", ima);
std::cout << "exiting" << std::endl;
}
--
1.6.5