LCOV - code coverage report
Current view: top level - src - strerror.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 2 2 100.0 %
Date: 2026-07-14 21:28:07 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright 2019-2026 David Robillard <d@drobilla.net>
       2                 :            : // SPDX-License-Identifier: ISC
       3                 :            : 
       4                 :            : #include <exess/exess.h>
       5                 :            : 
       6                 :            : static const char* const strings[] = {
       7                 :            :   "Success",
       8                 :            :   "Lossy operation",
       9                 :            :   "Expected \"false\", \"true\", \"0\" or \"1\"",
      10                 :            :   "Expected an integer value",
      11                 :            :   "Expected a duration starting with 'P'",
      12                 :            :   "Expected '-' or '+'",
      13                 :            :   "Expected a digit",
      14                 :            :   "Expected '0'",
      15                 :            :   "Expected ':'",
      16                 :            :   "Expected '-'",
      17                 :            :   "Expected 'T'",
      18                 :            :   "Expected 'H', 'M', or 'S'",
      19                 :            :   "Expected 'Y', 'M', or 'D'",
      20                 :            :   "Expected 'S'",
      21                 :            :   "Expected a hexadecimal character",
      22                 :            :   "Expected a base64 character",
      23                 :            :   "Invalid field order",
      24                 :            :   "Invalid value",
      25                 :            :   "Value out of range",
      26                 :            :   "Insufficient space",
      27                 :            :   "Unsupported value",
      28                 :            : };
      29                 :            : 
      30                 :            : EXESS_NONBLOCKING const char*
      31                 :         23 : exess_strerror(const ExessStatus status)
      32                 :            : {
      33                 :            :   return ((unsigned)status <= (unsigned)EXESS_UNSUPPORTED) ? strings[status]
      34         [ +  + ]:         23 :                                                            : "Unknown error";
      35                 :            : }

Generated by: LCOV version 1.16