diff --git a/tests/expressions_mixed.cpp b/tests/expressions_mixed.cpp index bf79d86fc1..d3f9354217 100644 --- a/tests/expressions_mixed.cpp +++ b/tests/expressions_mixed.cpp @@ -176,6 +176,10 @@ BOOST_AUTO_TEST_CASE(mult_factories) { // BOOST_CHECK_NO_THROW(w("a,b") = u("a,b") * v("a,b")); } +BOOST_AUTO_TEST_CASE(reduction_factories) { + BOOST_CHECK_NO_THROW(v("a,b").norm()); +} + BOOST_AUTO_TEST_CASE(kronecker) { #if !MULT_DENSE_SPARSE_TO_SPARSE // ok diff --git a/tests/sparse_tile.h b/tests/sparse_tile.h index 70897d7ca1..99f56d367e 100644 --- a/tests/sparse_tile.h +++ b/tests/sparse_tile.h @@ -638,7 +638,9 @@ typename EigenSparseTile::numeric_type product( // foreach(i) result += arg[i] * arg[i] template typename EigenSparseTile::numeric_type squared_norm( - const EigenSparseTile& arg); + const EigenSparseTile& arg) { + return arg.matrix().squaredNorm(); +} // sqrt(squared_norm(arg)) template typename EigenSparseTile::numeric_type norm(