Coverage Report

Created: 2026-07-14 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/sbi/openapi/model/user_consent.c
Line
Count
Source
1
2
#include <stdlib.h>
3
#include <string.h>
4
#include <stdio.h>
5
#include "user_consent.h"
6
7
char* OpenAPI_user_consent_ToString(OpenAPI_user_consent_e user_consent)
8
0
{
9
0
    const char *user_consentArray[] =  { "NULL", "CONSENT_NOT_GIVEN", "CONSENT_GIVEN" };
10
0
    size_t sizeofArray = sizeof(user_consentArray) / sizeof(user_consentArray[0]);
11
0
    if (user_consent < sizeofArray)
12
0
        return (char *)user_consentArray[user_consent];
13
0
    else
14
0
        return (char *)"Unknown";
15
0
}
16
17
OpenAPI_user_consent_e OpenAPI_user_consent_FromString(char* user_consent)
18
0
{
19
0
    int stringToReturn = 0;
20
0
    const char *user_consentArray[] =  { "NULL", "CONSENT_NOT_GIVEN", "CONSENT_GIVEN" };
21
0
    size_t sizeofArray = sizeof(user_consentArray) / sizeof(user_consentArray[0]);
22
0
    while (stringToReturn < sizeofArray) {
23
0
        if (strcmp(user_consent, user_consentArray[stringToReturn]) == 0) {
24
0
            return stringToReturn;
25
0
        }
26
0
        stringToReturn++;
27
0
    }
28
0
    return 0;
29
0
}
30