[libc-commits] [libc] 5ae9b42 - [libc] Use ASSERT_ instead of EXPECT_ in memcmp tests
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Tue Jun 28 02:36:13 PDT 2022
Author: Guillaume Chatelet
Date: 2022-06-28T09:36:04Z
New Revision: 5ae9b42efb206fa27e8d0eea702f80b08e769e2f
URL: https://github.com/llvm/llvm-project/commit/5ae9b42efb206fa27e8d0eea702f80b08e769e2f
DIFF: https://github.com/llvm/llvm-project/commit/5ae9b42efb206fa27e8d0eea702f80b08e769e2f.diff
LOG: [libc] Use ASSERT_ instead of EXPECT_ in memcmp tests
Added:
Modified:
libc/test/src/string/memcmp_test.cpp
Removed:
################################################################################
diff --git a/libc/test/src/string/memcmp_test.cpp b/libc/test/src/string/memcmp_test.cpp
index 0cd33ebdaf85a..ab798012342e8 100644
--- a/libc/test/src/string/memcmp_test.cpp
+++ b/libc/test/src/string/memcmp_test.cpp
@@ -46,13 +46,13 @@ TEST(LlvmLibcMemcmpTest, Sweep) {
reset(lhs);
reset(rhs);
for (size_t i = 0; i < K_MAX_SIZE; ++i)
- EXPECT_EQ(__llvm_libc::memcmp(lhs, rhs, i), 0);
+ ASSERT_EQ(__llvm_libc::memcmp(lhs, rhs, i), 0);
reset(lhs);
reset(rhs);
for (size_t i = 0; i < K_MAX_SIZE; ++i) {
rhs[i] = 'z';
- EXPECT_LT(__llvm_libc::memcmp(lhs, rhs, K_MAX_SIZE), 0);
+ ASSERT_LT(__llvm_libc::memcmp(lhs, rhs, K_MAX_SIZE), 0);
rhs[i] = 'a';
}
}
More information about the libc-commits
mailing list