Merge "Improve system() coverage." am: ac3fcc6b8c

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1623240

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9de69702831193c034462f1c936864c8f8a37c8
This commit is contained in:
Elliott Hughes 2021-03-09 16:40:21 +00:00 committed by Automerger Merge Worker
commit 95dcc9f76b

View file

@ -489,6 +489,12 @@ TEST(stdlib, system) {
ASSERT_EQ(1, WEXITSTATUS(status));
}
TEST(stdlib, system_NULL) {
// "The system() function shall always return non-zero when command is NULL."
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html
ASSERT_NE(0, system(nullptr));
}
TEST(stdlib, atof) {
ASSERT_DOUBLE_EQ(1.23, atof("1.23"));
}