summaryrefslogtreecommitdiff
path: root/tests/stdlib_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-12-15 13:55:53 -0800
committerElliott Hughes <enh@google.com>2017-12-15 13:55:53 -0800
commita7f12944d4154a445ee774683e27447d609de540 (patch)
tree7e2683233d0a36b825f630b1fc0f069e306463e8 /tests/stdlib_test.cpp
parent59a6ee963f96eedf01df7db1e57397ff71852b15 (diff)
A few more trivial tests.
Based on gaps in the list of functions not referenced by the test executable. Bug: N/A Test: ran tests Change-Id: I73c238e7cf360f94670c7cd13eb954341c940b7b
Diffstat (limited to 'tests/stdlib_test.cpp')
-rw-r--r--tests/stdlib_test.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp
index ed5767c16..1a3fc03d6 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -325,16 +325,12 @@ TEST_F(stdlib_DeathTest, getenv_after_main_thread_exits) {
TEST(stdlib, mkostemp64) {
TemporaryFile tf([](char* path) { return mkostemp64(path, O_CLOEXEC); });
- int flags = fcntl(tf.fd, F_GETFD);
- ASSERT_TRUE(flags != -1);
- ASSERT_EQ(FD_CLOEXEC, flags & FD_CLOEXEC);
+ AssertCloseOnExec(tf.fd, true);
}
TEST(stdlib, mkostemp) {
TemporaryFile tf([](char* path) { return mkostemp(path, O_CLOEXEC); });
- int flags = fcntl(tf.fd, F_GETFD);
- ASSERT_TRUE(flags != -1);
- ASSERT_EQ(FD_CLOEXEC, flags & FD_CLOEXEC);
+ AssertCloseOnExec(tf.fd, true);
}
TEST(stdlib, mkstemp64) {