last-svn-commit-517-ga42fcb6 Add a test on built-in floating point value's traits.

* tests/value/builtin/floatings.cc: New. * tests/value/builtin/Makefile.am (check_PROGRAMS): Add floatings. (floatings_SOURCES): New. --- milena/ChangeLog | 8 ++++++ milena/tests/value/builtin/Makefile.am | 6 +++- .../tests/value/builtin/floatings.cc | 24 +++++++------------ 3 files changed, 21 insertions(+), 17 deletions(-) copy scribo/tests/toolchain/nepomuk/text_extraction.cc => milena/tests/value/builtin/floatings.cc (75%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 59ce01f..4fa2864 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,13 @@ 2010-10-21 Roland Levillain <roland@lrde.epita.fr> + Add a test on built-in floating point value's traits. + + * tests/value/builtin/floatings.cc: New. + * tests/value/builtin/Makefile.am (check_PROGRAMS): Add floatings. + (floatings_SOURCES): New. + +2010-10-21 Roland Levillain <roland@lrde.epita.fr> + Add macros for non-template contexts in mln/value/ops.hh. * mln/value/ops.hh (mln_trait_value_sum_product_) diff --git a/milena/tests/value/builtin/Makefile.am b/milena/tests/value/builtin/Makefile.am index fd5347d..31ac350 100644 --- a/milena/tests/value/builtin/Makefile.am +++ b/milena/tests/value/builtin/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2008, 2009 EPITA Research and Development +# Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development # Laboratory (LRDE). # # This file is part of Olena. @@ -18,9 +18,11 @@ include $(top_srcdir)/milena/tests/tests.mk check_PROGRAMS = \ - builtin + builtin \ + floatings # FIXME: Rename this test, as `builtin' is not enough relevant. builtin_SOURCES = builtin.cc +floatings_SOURCES = floatings.cc TESTS = $(check_PROGRAMS) diff --git a/scribo/tests/toolchain/nepomuk/text_extraction.cc b/milena/tests/value/builtin/floatings.cc similarity index 75% copy from scribo/tests/toolchain/nepomuk/text_extraction.cc copy to milena/tests/value/builtin/floatings.cc index 027ad99..87d493a 100644 --- a/scribo/tests/toolchain/nepomuk/text_extraction.cc +++ b/milena/tests/value/builtin/floatings.cc @@ -23,22 +23,16 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. -/// \file -/// -/// Test of scribo::toolchain::nepomuk::text_extraction - -#include <QtGui/QImage> -#include <QtCore> -#include <scribo/toolchain/nepomuk/text_extraction.hh> - -#include "tests/data.hh" +#include <mln/value/ops.hh> +#include <mln/value/builtin/floatings.hh> int main() { - QImage ima(SCRIBO_IMG_DIR "/wildly.pbm"); - QSet<QString> words = scribo::toolchain::nepomuk::text_extraction(ima); - - mln_assertion(words.size() == 1); - mln_assertion(words.contains("Wildly")); - return 0; + std::cout << "mln_sum_product_(float, float) is `" + << mln_trait_value_name(mln_sum_product_(float, float)) << "'" + << std::endl; + // FIXME: Displays `float': probably not good. :( + std::cout << "mln_sum_product_(double, double)) is `" + << mln_trait_value_name(mln_sum_product_(double, double)) << "'" + << std::endl; } -- 1.5.6.5
participants (1)
-
Roland Levillain