diff options
author | Elliott Hughes <enh@google.com> | 2014-03-12 16:12:57 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-03-12 16:12:57 -0700 |
commit | 5a8173860d65182af022be88fed0c5d8d5dcb69d (patch) | |
tree | 907e7263b278203193247ef582a4e1a8b263e21e /tests/stdlib_test.cpp | |
parent | 56e1eebd39be4830f309603b38e4b1118c544fb3 (diff) |
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
Diffstat (limited to 'tests/stdlib_test.cpp')
-rw-r--r-- | tests/stdlib_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp index 083e86a63..7bdb685d5 100644 --- a/tests/stdlib_test.cpp +++ b/tests/stdlib_test.cpp @@ -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)); +} |