olena: olena-2.0-626-g95ac14a Fix a couple of Milena tests.

* tests/accu/compute.cc: Correction the checked assertion. * tests/value/scalar.cc: Remove this (non-relevant) test. --- milena/ChangeLog | 7 ++++ milena/tests/accu/compute.cc | 5 ++- milena/tests/value/Makefile.am | 1 - milena/tests/value/scalar.cc | 90 ---------------------------------------- 4 files changed, 10 insertions(+), 93 deletions(-) delete mode 100644 milena/tests/value/scalar.cc diff --git a/milena/ChangeLog b/milena/ChangeLog index 99e7091..2e0ed94 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,12 @@ 2013-08-23 Roland Levillain <roland@lrde.epita.fr> + Fix a couple of Milena tests. + + * tests/accu/compute.cc: Correction the checked assertion. + * tests/value/scalar.cc: Remove this (non-relevant) test. + +2013-08-23 Roland Levillain <roland@lrde.epita.fr> + * mln/data/transform: Remove (empty) file. 2013-08-23 Roland Levillain <roland@lrde.epita.fr> diff --git a/milena/tests/accu/compute.cc b/milena/tests/accu/compute.cc index c93323f..2e3170b 100644 --- a/milena/tests/accu/compute.cc +++ b/milena/tests/accu/compute.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -38,5 +39,5 @@ int main() unsigned n = 3; image2d<int_u8> ima(n, n); unsigned c = accu::compute(accu::meta::math::count(), ima); - mln_assertion(c = n * n); + mln_assertion(c == n * n); } diff --git a/milena/tests/value/Makefile.am b/milena/tests/value/Makefile.am index c0d901a..46e24ac 100644 --- a/milena/tests/value/Makefile.am +++ b/milena/tests/value/Makefile.am @@ -33,7 +33,6 @@ check_PROGRAMS = \ label \ proxy \ rgb8 \ - scalar \ set \ sign # float01 diff --git a/milena/tests/value/scalar.cc b/milena/tests/value/scalar.cc deleted file mode 100644 index b5186e4..0000000 --- a/milena/tests/value/scalar.cc +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) -// -// This file is part of Olena. -// -// Olena is free software: you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free -// Software Foundation, version 2 of the License. -// -// Olena is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Olena. If not, see <http://www.gnu.org/licenses/>. -// -// As a special exception, you may use this file as part of a free -// software project without restriction. Specifically, if other files -// instantiate templates or use macros or inline functions from this -// file, or you compile this file and link it with other files to produce -// an executable, this file does not by itself cause the resulting -// executable to be covered by the GNU General Public License. This -// exception does not however invalidate any other reasons why the -// executable file might be covered by the GNU General Public License. - -#include <iostream> - -#include <mln/value/scalar.hh> -#include <mln/value/int_u8.hh> - - -template <typename T> -void foo(const T& t) -{ - std::cout << mln::value::scalar(t) << std::endl; -} - -namespace mln -{ - namespace trait - { - // FIXME: Dead code? -// template <typename O1, typename O2> -// struct set_binary_< op::less, Object,O1, Object,O2 > { typedef bool ret; }; - -// template < typename Vl, typename Vr > -// struct set_binary_< op::less, mln::value::Scalar, Vl, mln::value::Scalar, Vr > -// { -// typedef double ret; -// }; - -// template <typename B, typename O> -// struct set_binary_< op::less, -// mln::value::Integer, B, -// mln::value::Scalar, O > -// { -// typedef bool ret; -// }; - - } -} - - -int main() -{ - using namespace mln; - - // FIXME: Dead code? -// int i = 51; -// foo(i); -// foo( value::scalar(i) ); - - - { - bool b; - value::int_u8 i, j; - - b = 1 > value::scalar(j); - - b = value::scalar(j) < value::scalar(j); - - // FIXME: Dead code? -// mln_trait_op_less_(value::scalar_< value::int_u8 >, value::scalar_< value::int_u8 >) tmp; -// void* v = tmp; - -// mln_trait_op_less_(int, value::scalar_< value::int_u8 >) tmp; -// void* v = tmp; - } - -} -- 1.7.10.4
participants (1)
-
Roland Levillain