diff --git a/.aider.tags.cache.v4/50/ad/d85423dcb4ffb8880bc83cc0788c.val b/.aider.tags.cache.v4/50/ad/d85423dcb4ffb8880bc83cc0788c.val new file mode 100644 index 00000000..a759a8c3 Binary files /dev/null and b/.aider.tags.cache.v4/50/ad/d85423dcb4ffb8880bc83cc0788c.val differ diff --git a/.aider.tags.cache.v4/61/50/f7ccfc2f5a54b419851527cbe018.val b/.aider.tags.cache.v4/61/50/f7ccfc2f5a54b419851527cbe018.val new file mode 100644 index 00000000..2fc66a9b Binary files /dev/null and b/.aider.tags.cache.v4/61/50/f7ccfc2f5a54b419851527cbe018.val differ diff --git a/.aider.tags.cache.v4/cache.db b/.aider.tags.cache.v4/cache.db new file mode 100644 index 00000000..3b0e3660 Binary files /dev/null and b/.aider.tags.cache.v4/cache.db differ diff --git a/.aider.tags.cache.v4/cd/d8/101f73b776acffdc0f5c332980d3.val b/.aider.tags.cache.v4/cd/d8/101f73b776acffdc0f5c332980d3.val new file mode 100644 index 00000000..9a2f7459 Binary files /dev/null and b/.aider.tags.cache.v4/cd/d8/101f73b776acffdc0f5c332980d3.val differ diff --git a/frailbox/tests/test_connector.c b/frailbox/tests/test_connector.c index 7e0cd0d0..e6aabcca 100644 --- a/frailbox/tests/test_connector.c +++ b/frailbox/tests/test_connector.c @@ -243,13 +243,8 @@ TEST(test_connector_double_init) TEST(test_connector_null_init) { - /* TODO: This test crashes because connector_init doesn't check for NULL. - * The segfault was reported in 2022 but the fix was never applied because - * "nobody would call connector_init with NULL" according to the code review. - * Well, this test does. The test is currently commented out because it - * crashes the test runner. Uncomment when the NULL check is added. */ - // connector_result_t result = connector_init(NULL); - // ASSERT_EQ(result, CONNECTOR_ERROR_INVALID_PARAM, "NULL init should return INVALID_PARAM"); + connector_result_t result = connector_init(NULL); + ASSERT_EQ(result, CONNECTOR_ERROR_INVALID_PARAM, "NULL init should return INVALID_PARAM"); return 0; } @@ -592,8 +587,8 @@ TEST(test_connector_shutdown_without_init) /* Note: This test would fail if run after global teardown. * It's here for documentation purposes. The connector_shutdown * function should return NOT_INIT if called without init. */ - // connector_result_t result = connector_shutdown(); - // ASSERT_EQ(result, CONNECTOR_ERROR_NOT_INIT); + connector_result_t result = connector_shutdown(); + ASSERT_EQ(result, CONNECTOR_ERROR_NOT_INIT); return 0; } @@ -618,6 +613,10 @@ int main(void) return 1; } + /* Run edge case tests first */ + test_connector_null_init(); + test_connector_shutdown_without_init(); + int result = run_all_tests(); if (global_teardown() != 0) {