summaryrefslogtreecommitdiff
path: root/tests/sys_random_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-08 15:20:23 -0800
committerElliott Hughes <enh@google.com>2019-03-12 10:26:39 -0700
commitbcaa454d32e1b4ccf92467bb263d627695ac9a5b (patch)
tree65d7d4c493242ecb51bfe1796f133b32538de514 /tests/sys_random_test.cpp
parentff16c0b89b7297bc70353f60afac9bb93d6b0087 (diff)
bionic tests: use GTEST_SKIP.
Also be a bit more to the point in our messages, focusing on "why" not "what". Test: ran tests Change-Id: I297806c7a102bd52602dcd2fcf7a2cd34aba3a11
Diffstat (limited to 'tests/sys_random_test.cpp')
-rw-r--r--tests/sys_random_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sys_random_test.cpp b/tests/sys_random_test.cpp
index 78cbf4a71..2e2665b89 100644
--- a/tests/sys_random_test.cpp
+++ b/tests/sys_random_test.cpp
@@ -43,7 +43,7 @@ TEST(sys_random, getentropy) {
ASSERT_EQ(0, getentropy(buf2, sizeof(buf2)));
ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}
@@ -53,7 +53,7 @@ TEST(sys_random, getentropy_EFAULT) {
ASSERT_EQ(-1, getentropy(nullptr, 1));
ASSERT_EQ(EFAULT, errno);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}
@@ -66,7 +66,7 @@ TEST(sys_random, getentropy_EIO) {
ASSERT_EQ(-1, getentropy(buf, sizeof(buf)));
ASSERT_EQ(EIO, errno);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}
@@ -79,7 +79,7 @@ TEST(sys_random, getrandom) {
ASSERT_EQ(64, getrandom(buf2, sizeof(buf2), 0));
ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}
@@ -89,7 +89,7 @@ TEST(sys_random, getrandom_EFAULT) {
ASSERT_EQ(-1, getrandom(nullptr, 256, 0));
ASSERT_EQ(EFAULT, errno);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}
@@ -100,6 +100,6 @@ TEST(sys_random, getrandom_EINVAL) {
ASSERT_EQ(-1, getrandom(buf, sizeof(buf), ~0));
ASSERT_EQ(EINVAL, errno);
#else
- GTEST_LOG_(INFO) << "This test requires a C library with <sys/random.h>.\n";
+ GTEST_SKIP() << "<sys/random.h> not available";
#endif
}