summaryrefslogtreecommitdiff
path: root/test/unit/zero.c
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2022-05-06 11:28:25 -0700
committerQi Wang <interwq@gwu.edu>2022-05-06 11:28:25 -0700
commit54eaed1d8b56b1aa528be3bdd1877e59c56fa90c (patch)
treee79620e0c00b1f8b6b698fbe74df6bae7d812ae2 /test/unit/zero.c
parentea6b3e973b477b8061e0076bb257dbd7f3faa756 (diff)
parent304c919829f9f340669b61fa64867cfe5dba8021 (diff)
downloadjemalloc-master.tar.gz
Merge branch 'dev'5.3.0master
Diffstat (limited to 'test/unit/zero.c')
-rw-r--r--test/unit/zero.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/zero.c b/test/unit/zero.c
index 271fd5cb..d3e81f1b 100644
--- a/test/unit/zero.c
+++ b/test/unit/zero.c
@@ -8,21 +8,21 @@ test_zero(size_t sz_min, size_t sz_max) {
sz_prev = 0;
s = (uint8_t *)mallocx(sz_min, 0);
- assert_ptr_not_null((void *)s, "Unexpected mallocx() failure");
+ expect_ptr_not_null((void *)s, "Unexpected mallocx() failure");
for (sz = sallocx(s, 0); sz <= sz_max;
sz_prev = sz, sz = sallocx(s, 0)) {
if (sz_prev > 0) {
- assert_u_eq(s[0], MAGIC,
+ expect_u_eq(s[0], MAGIC,
"Previously allocated byte %zu/%zu is corrupted",
ZU(0), sz_prev);
- assert_u_eq(s[sz_prev-1], MAGIC,
+ expect_u_eq(s[sz_prev-1], MAGIC,
"Previously allocated byte %zu/%zu is corrupted",
sz_prev-1, sz_prev);
}
for (i = sz_prev; i < sz; i++) {
- assert_u_eq(s[i], 0x0,
+ expect_u_eq(s[i], 0x0,
"Newly allocated byte %zu/%zu isn't zero-filled",
i, sz);
s[i] = MAGIC;
@@ -30,7 +30,7 @@ test_zero(size_t sz_min, size_t sz_max) {
if (xallocx(s, sz+1, 0, 0) == sz) {
s = (uint8_t *)rallocx(s, sz+1, 0);
- assert_ptr_not_null((void *)s,
+ expect_ptr_not_null((void *)s,
"Unexpected rallocx() failure");
}
}