fix: harden queue and receiver error handling

This commit is contained in:
2026-08-08 20:25:58 +02:00
parent 98cb8e212e
commit e8e9436879
4 changed files with 99 additions and 22 deletions
+6
View File
@@ -56,6 +56,11 @@ static void test_queue_basic() {
queue_destroy(q);
}
static void test_queue_rejects_invalid_capacity() {
EXPECT_NULL(queue_create(0, NULL));
EXPECT_NULL(queue_create(-1, NULL));
}
static void test_queue_resize() {
Queue* q = queue_create(3, NULL);
EXPECT_NOT_NULL(q);
@@ -199,6 +204,7 @@ static void test_queue_multithreaded() {
void test_queue() {
test_queue_basic();
test_queue_rejects_invalid_capacity();
test_queue_resize();
test_queue_destroyer();
test_queue_multithreaded();