aboutsummaryrefslogtreecommitdiffstats
path: root/tests/math_test.cpp
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-11-18 18:47:48 +0000
committerNarayan Kamath <narayan@google.com>2013-11-18 19:00:59 +0000
commitaf64dad4796ab4f077e2f2ba1e90cc56b6575d63 (patch)
treeb219e1771210f5db0dc42dc20e889d77d9a39981 /tests/math_test.cpp
parentf246c589d66e5dc0e3cddc3c37261fb0e3fc67e9 (diff)
downloadandroid_bionic-af64dad4796ab4f077e2f2ba1e90cc56b6575d63.tar.gz
android_bionic-af64dad4796ab4f077e2f2ba1e90cc56b6575d63.tar.bz2
android_bionic-af64dad4796ab4f077e2f2ba1e90cc56b6575d63.zip
Add test case for 1^NaN
Should be 1. Change-Id: I6cf723a419f51d3bda58286a538774b71276c7b5
Diffstat (limited to 'tests/math_test.cpp')
-rw-r--r--tests/math_test.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/math_test.cpp b/tests/math_test.cpp
index 4c21a996a..454646d7d 100644
--- a/tests/math_test.cpp
+++ b/tests/math_test.cpp
@@ -486,18 +486,21 @@ TEST(math, expm1l) {
TEST(math, pow) {
ASSERT_TRUE(isnan(pow(nan(""), 3.0)));
+ ASSERT_FLOAT_EQ(1.0, (pow(1.0, nan(""))));
ASSERT_TRUE(isnan(pow(2.0, nan(""))));
ASSERT_FLOAT_EQ(8.0, pow(2.0, 3.0));
}
TEST(math, powf) {
ASSERT_TRUE(isnanf(powf(nanf(""), 3.0f)));
+ ASSERT_FLOAT_EQ(1.0f, (powf(1.0f, nanf(""))));
ASSERT_TRUE(isnanf(powf(2.0f, nanf(""))));
ASSERT_FLOAT_EQ(8.0f, powf(2.0f, 3.0f));
}
TEST(math, powl) {
ASSERT_TRUE(__isnanl(powl(nanl(""), 3.0)));
+ ASSERT_FLOAT_EQ(1.0, (powl(1.0, nanl(""))));
ASSERT_TRUE(__isnanl(powl(2.0, nanl(""))));
ASSERT_FLOAT_EQ(8.0, powl(2.0, 3.0));
}