Coverage Report

Created: 2026-08-14 06:04

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