Ensure we always have symbols for atof, strtof, strtold.

We'll need a better implementation of strtold for LP64, but all our
long double functions are currently broken for LP64 anyway so this
isn't a regression.

Change-Id: I2bdebac11245d31521d5fa09a16331c03dc4339c
This commit is contained in:
Elliott Hughes
2014-03-12 16:12:57 -07:00
parent 56e1eebd39
commit 5a8173860d
6 changed files with 131 additions and 15 deletions

View File

@@ -186,3 +186,19 @@ TEST(stdlib, system) {
ASSERT_TRUE(WIFEXITED(status));
ASSERT_EQ(1, WEXITSTATUS(status));
}
TEST(stdlib, atof) {
ASSERT_EQ(1.23, atof("1.23"));
}
TEST(stdlib, strtod) {
ASSERT_EQ(1.23, strtod("1.23", NULL));
}
TEST(stdlib, strtof) {
ASSERT_EQ(1.23, strtod("1.23", NULL));
}
TEST(stdlib, strtold) {
ASSERT_EQ(1.23, strtold("1.23", NULL));
}