am ab894977: am 3cc7da48: am c4250430: Merge "Add unit tests for pow\'s behavior with NaNs."

* commit 'ab894977da4e7519aa5c69b38817ee54ae8fd519':
  Add unit tests for pow's behavior with NaNs.
This commit is contained in:
Elliott Hughes 2013-11-13 18:44:12 -08:00 committed by Android Git Automerger
commit 67b73d370b

View File

@ -485,14 +485,20 @@ TEST(math, expm1l) {
}
TEST(math, pow) {
ASSERT_TRUE(isnan(pow(nan(""), 3.0)));
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_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_TRUE(__isnanl(powl(2.0, nanl(""))));
ASSERT_FLOAT_EQ(8.0, powl(2.0, 3.0));
}