2 #include "../../src/protocol.h"
4 static void test_get_invalid_request(void **state) {
7 assert_null(get_request_entry(ALL));
8 assert_null(get_request_entry(LAST));
11 static void test_get_valid_request_returns_nonnull(void **state) {
14 for(request_t req = ID; req < LAST; ++req) {
15 const request_entry_t *ent = get_request_entry(req);
17 assert_non_null(ent->name);
22 const struct CMUnitTest tests[] = {
23 cmocka_unit_test(test_get_invalid_request),
24 cmocka_unit_test(test_get_valid_request_returns_nonnull),
26 return cmocka_run_group_tests(tests, NULL, NULL);