aboutsummaryrefslogtreecommitdiff
path: root/tests/fenv_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-30 19:06:37 -0800
committerElliott Hughes <enh@google.com>2013-02-01 14:51:19 -0800
commita0ee07829a9ba7e99ef68e8c12551301cc797f0f (patch)
treefefc432ee572779579a16d2868d4181a33399281 /tests/fenv_test.cpp
parenta990cf5b3392c5aef767aee1e67b4d7ef651afc6 (diff)
downloadbionic-a0ee07829a9ba7e99ef68e8c12551301cc797f0f.tar.gz
Upgrade libm.
This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies the set of functions we support on ARM, MIPS, and x86, fixes "long double", adds ISO C99 support, and adds basic unit tests. It turns out that our "long double" functions have always been broken for non-normal numbers. This patch fixes that by not using the upstream implementations and just forwarding to the regular "double" implementation instead (since "long double" on Android is just "double" anyway, which is what BSD doesn't support). All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64. Bug: 3169850 Bug: 8012787 Bug: https://code.google.com/p/android/issues/detail?id=6697 Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
Diffstat (limited to 'tests/fenv_test.cpp')
-rw-r--r--tests/fenv_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/fenv_test.cpp b/tests/fenv_test.cpp
index 4adb06658..db1bfc32b 100644
--- a/tests/fenv_test.cpp
+++ b/tests/fenv_test.cpp
@@ -79,3 +79,7 @@ TEST(fenv, feclearexcept_fetestexcept) {
feclearexcept(FE_DIVBYZERO);
ASSERT_EQ(0, fetestexcept(FE_ALL_EXCEPT));
}
+
+TEST(fenv, FE_DFL_ENV_macro) {
+ ASSERT_EQ(0, fesetenv(FE_DFL_ENV));
+}