SolidSyslog coverage report
Current view: top level - Core/Source - SolidSyslogTcpStreamErrorsName.c (source / functions) Coverage Total Hit
Test: SolidSyslog Lines: 100.0 % 2 2
Test Date: 2026-11-12 23:14:35 Functions: 100.0 % 1 1

            Line data    Source code
       1              : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
       2              :  * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
       3              :  */
       4              : 
       5              : #include "SolidSyslogTcpStreamErrors.h"
       6              : 
       7              : #include <stdint.h>
       8              : 
       9              : #include "SolidSyslogErrorName.h"
      10              : 
      11              : /* Indexed by the enum, so no name can shift; a code without one is NULL. */
      12           13 : const char* SolidSyslogTcpStreamErrors_Name(int32_t detail)
      13              : {
      14              :     static const char* const names[SOLIDSYSLOG_TCP_STREAM_ERROR_MAX] = {
      15              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_POOL_EXHAUSTED] = "POOL_EXHAUSTED",
      16              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_UNKNOWN_DESTROY] = "UNKNOWN_DESTROY",
      17              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_NULL_CONFIG] = "NULL_CONFIG",
      18              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_NULL_SLEEP] = "NULL_SLEEP",
      19              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_ENDPOINT_UNAVAILABLE] = "ENDPOINT_UNAVAILABLE",
      20              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_CONNECT_NOT_STARTED] = "CONNECT_NOT_STARTED",
      21              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_CONNECT_REFUSED] = "CONNECT_REFUSED",
      22              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_CONNECT_TIMED_OUT] = "CONNECT_TIMED_OUT",
      23              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_SOCKET_OPTION_REFUSED] = "SOCKET_OPTION_REFUSED",
      24              :         [SOLIDSYSLOG_TCP_STREAM_ERROR_ALREADY_OPEN] = "ALREADY_OPEN",
      25              :     };
      26              : 
      27           13 :     return SolidSyslogErrorName_Lookup(names, (int32_t) SOLIDSYSLOG_TCP_STREAM_ERROR_MAX, detail);
      28              : }
        

Generated by: LCOV version 2.0-1