summaryrefslogtreecommitdiffstats
path: root/test.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-03-21 23:57:37 -0400
committerErik Schnetter <schnetter@gmail.com>2013-03-21 23:57:37 -0400
commit5713098ff2868deb25e487086bcbef91e4ccc18f (patch)
tree96fa651caeb15dab0ec0abd67338c3b2e2604a5b /test.cc
parent1dae8653132405bcaada3cbf29f0eac666e8f376 (diff)
downloadvecmathlib-5713098ff2868deb25e487086bcbef91e4ccc18f.zip
vecmathlib-5713098ff2868deb25e487086bcbef91e4ccc18f.tar.gz
Don't test nan/inf if they are not supported
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.cc b/test.cc
index a14ffe4..de6c857 100644
--- a/test.cc
+++ b/test.cc
@@ -406,10 +406,18 @@ struct vecmathlib_test {
check("fmax", fmax, vecmathlib::fmax, x, y, 0.0);
check("fmin", fmin, vecmathlib::fmin, x, y, 0.0);
check("ilogb", ilogb, vecmathlib::ilogb, x);
+#if defined VML_HAVE_INF && defined VML_HAVE_NAN
check("isfinite", isfinite, vecmathlib::isfinite, x);
+#endif
+#ifdef VML_HAVE_INF
check("isinf", isinf, vecmathlib::isinf, x);
+#endif
+#ifdef VML_HAVE_NAN
check("isnan", isnan, vecmathlib::isnan, x);
+#endif
+#ifdef VML_HAVE_DENORMALS
check("isnormal", isnormal, vecmathlib::isnormal, x);
+#endif
check("ldexp", ldexp, vecmathlib::ldexp, x, n, 0.0);
check("signbit", signbit, vecmathlib::signbit, x);
}
OpenPOWER on IntegriCloud