[libc-commits] [PATCH] D108330: [libc] add atoi, atol, and atoll
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Aug 18 16:39:57 PDT 2021
sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: libc/test/src/stdlib/atol_test.cpp:42
+ ASSERT_EQ(__llvm_libc::atol(all_together), 110l);
+}
+
----------------
No `LONG_MAX` tests?
Also, test for overflow values in all tests? We don't need to check the `errno` value but may be check that the return value is `*_MAX`/`*_MIN`?
================
Comment at: libc/test/src/stdlib/atol_test.cpp:48
+
+ const char *octal = "010";
+ ASSERT_EQ(__llvm_libc::atol(hexadecimal), 10l);
----------------
Is this really an invalid number?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108330/new/
https://reviews.llvm.org/D108330
More information about the libc-commits
mailing list