diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
commit | 42f47327da6a208ac3cd1f9bca07fc506ed51a63 (patch) | |
tree | e06c5e993e0d0b618f616280b372506b1f0f8419 /tests/nghttp2_queue_test.c | |
parent | Adding debian version 1.59.0-1. (diff) | |
download | nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.tar.xz nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.zip |
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/nghttp2_queue_test.c')
-rw-r--r-- | tests/nghttp2_queue_test.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/nghttp2_queue_test.c b/tests/nghttp2_queue_test.c index cb993a8..9837b61 100644 --- a/tests/nghttp2_queue_test.c +++ b/tests/nghttp2_queue_test.c @@ -26,25 +26,34 @@ #include <stdio.h> -#include <CUnit/CUnit.h> +#include "munit.h" #include "nghttp2_queue.h" +static const MunitTest tests[] = { + munit_void_test(test_nghttp2_queue), + munit_test_end(), +}; + +const MunitSuite queue_suite = { + "/queue", tests, NULL, 1, MUNIT_SUITE_OPTION_NONE, +}; + void test_nghttp2_queue(void) { int ints[] = {1, 2, 3, 4, 5}; int i; nghttp2_queue queue; nghttp2_queue_init(&queue); - CU_ASSERT(nghttp2_queue_empty(&queue)); + assert_true(nghttp2_queue_empty(&queue)); for (i = 0; i < 5; ++i) { nghttp2_queue_push(&queue, &ints[i]); - CU_ASSERT_EQUAL(ints[0], *(int *)(nghttp2_queue_front(&queue))); - CU_ASSERT(!nghttp2_queue_empty(&queue)); + assert_int(ints[0], ==, *(int *)(nghttp2_queue_front(&queue))); + assert_false(nghttp2_queue_empty(&queue)); } for (i = 0; i < 5; ++i) { - CU_ASSERT_EQUAL(ints[i], *(int *)(nghttp2_queue_front(&queue))); + assert_int(ints[i], ==, *(int *)(nghttp2_queue_front(&queue))); nghttp2_queue_pop(&queue); } - CU_ASSERT(nghttp2_queue_empty(&queue)); + assert_true(nghttp2_queue_empty(&queue)); nghttp2_queue_free(&queue); } |