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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2a9c736ffba4aff902ea5fd2f2980042680e3f3
This commit is contained in:
Elliott Hughes 2021-03-09 17:01:08 +00:00 committed by Automerger Merge Worker
commit 82b0c96afe

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"));
}