aboutsummaryrefslogtreecommitdiff
path: root/test/benchmark-tcp-write-batch.c
diff options
context:
space:
mode:
authortjarlama <tjarlama@gmail.com>2020-12-29 13:56:10 +0530
committerSantiago Gimeno <santiago.gimeno@gmail.com>2021-02-14 10:05:46 +0100
commit270d05189c4241cfa5d94182e85d1510f1ee19e0 (patch)
treee414cdb7c47fc42cf1ad5ccf5c4021018bc80fc0 /test/benchmark-tcp-write-batch.c
parentc3d08b5d63267c70554da081ce9f35dfb81132e2 (diff)
downloadlibuv-270d05189c4241cfa5d94182e85d1510f1ee19e0.tar.gz
libuv-270d05189c4241cfa5d94182e85d1510f1ee19e0.zip
test: move to ASSERT_NULL and ASSERT_NOT_NULL test macros
Moving to new style test macros will make debugging easier in case of test failure and improve redability. This commit will replace all ASSERT macros matching the statement: `ASSERT(identifier (== or !=) value);` to: `ASSERT_(NOT_)NULL(identifier);` Refs: https://github.com/libuv/libuv/issues/2974 PR-URL: https://github.com/libuv/libuv/pull/3081 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/benchmark-tcp-write-batch.c')
-rw-r--r--test/benchmark-tcp-write-batch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/benchmark-tcp-write-batch.c b/test/benchmark-tcp-write-batch.c
index 96921b70..16aa72f6 100644
--- a/test/benchmark-tcp-write-batch.c
+++ b/test/benchmark-tcp-write-batch.c
@@ -71,7 +71,7 @@ static void connect_cb(uv_connect_t* req, int status) {
static void write_cb(uv_write_t* req, int status) {
- ASSERT(req != NULL);
+ ASSERT_NOT_NULL(req);
ASSERT(status == 0);
write_cb_called++;
}
@@ -103,7 +103,7 @@ BENCHMARK_IMPL(tcp_write_batch) {
int r;
write_reqs = malloc(sizeof(*write_reqs) * NUM_WRITE_REQS);
- ASSERT(write_reqs != NULL);
+ ASSERT_NOT_NULL(write_reqs);
/* Prepare the data to write out. */
for (i = 0; i < NUM_WRITE_REQS; i++) {