aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-05-20 14:45:33 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-05-20 14:45:33 +0200
commit8d6bd5691be9f7323c11dc179cf7121b3619428b (patch)
tree2e5ea41744b5f86bb59bdc5ea96fa204f7caeff6 /test
parent998f2efc58b10dbe24a2514f3563421398548704 (diff)
polygamma is C99/C++11 only
Diffstat (limited to 'test')
-rw-r--r--test/array.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/array.cpp b/test/array.cpp
index cb80c887a..ed81b0069 100644
--- a/test/array.cpp
+++ b/test/array.cpp
@@ -582,6 +582,7 @@ template<typename ArrayType> void array_special_functions()
}
+#ifdef EIGEN_HAS_C99_MATH
{
ArrayType n(11), x(11), res(11), ref(11);
n << 1, 1, 1, 1.5, 17, 31, 28, 8, 42, 147, 170;
@@ -597,12 +598,17 @@ template<typename ArrayType> void array_special_functions()
// CALL_SUBTEST( res = x.polygamma(n); verify_component_wise(res.head(8), ref.head(8)); );
CALL_SUBTEST( res = polygamma(n,x); verify_component_wise(res.head(8), ref.head(8)); );
}
+#endif
}
}
void test_array()
{
+#ifndef EIGEN_HAS_C99_MATH
+ std::cerr << "WARNING: testing of special math functions disabled" << std::endl;
+#endif
+
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST_1( array(Array<float, 1, 1>()) );
CALL_SUBTEST_2( array(Array22f()) );