* tests/value/literals_op.cc: New test.
* tests/value/Makefile.am (check_PROGRAMS): Add literals_op.
---
milena/ChangeLog | 7 +++++++
milena/tests/value/Makefile.am | 5 +++--
.../essential.hh => tests/value/literals_op.cc} | 21 +++++++++++---------
3 files changed, 22 insertions(+), 11 deletions(-)
copy milena/{mln/literal/essential.hh => tests/value/literals_op.cc} (78%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index acf88b9..97b2bb9 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2014-05-20 Roland Levillain <roland(a)lrde.epita.fr>
+ Add a test case to exercise the issue of Trac ticket #125.
+
+ * tests/value/literals_op.cc: New test.
+ * tests/value/Makefile.am (check_PROGRAMS): Add literals_op.
+
+2014-05-20 Roland Levillain <roland(a)lrde.epita.fr>
+
Improve tests on mln::border::mirror.
* tests/border/mirror.cc: Revamp.
diff --git a/milena/tests/value/Makefile.am b/milena/tests/value/Makefile.am
index 21ca6f4..e9f6bd1 100644
--- a/milena/tests/value/Makefile.am
+++ b/milena/tests/value/Makefile.am
@@ -1,5 +1,5 @@
-# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 EPITA Research and
-# Development Laboratory (LRDE).
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 EPITA
+# Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -31,6 +31,7 @@ check_PROGRAMS = \
int_u8 \
interop \
label \
+ literals_op \
proxy \
rgb8 \
set \
diff --git a/milena/mln/literal/essential.hh b/milena/tests/value/literals_op.cc
similarity index 78%
copy from milena/mln/literal/essential.hh
copy to milena/tests/value/literals_op.cc
index 32d8869..6e2605e 100644
--- a/milena/mln/literal/essential.hh
+++ b/milena/tests/value/literals_op.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2014 EPITA Research and Development Laboratory (LRDE).
//
// This file is part of Olena.
//
@@ -23,14 +23,17 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef MLN_LITERAL_ESSENTIAL_HH
-# define MLN_LITERAL_ESSENTIAL_HH
-
-/*! \file
- *
- * \brief File that includes essential literals.
- */
+// Exercise operators between Milena values (such as mln::value::gl8)
+// and literals (such as mln::literal::white).
+# include <mln/value/gl8.hh>
# include <mln/literal/all.hh>
-#endif // ! MLN_LITERAL_ESSENTIAL_HH
+int main()
+{
+ using mln::value::gl8;
+ using mln::literal::white;
+
+ gl8 g = 255;
+ mln_assertion(g == white);
+}
--
1.7.10.4
Show replies by date