LCOV - code coverage report
Current view: top level - test - test_args.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 3 3 100.0 %
Date: 2026-11-26 02:32:31 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright 2022 David Robillard <d@drobilla.net>
       2                 :            : // SPDX-License-Identifier: ISC
       3                 :            : 
       4                 :            : #ifndef ZIX_TEST_ARGS_H
       5                 :            : #define ZIX_TEST_ARGS_H
       6                 :            : 
       7                 :            : #include <stddef.h>
       8                 :            : #include <stdlib.h>
       9                 :            : 
      10                 :            : static inline size_t
      11                 :          6 : zix_test_size_arg(const char* const string, const size_t min, const size_t max)
      12                 :            : {
      13                 :          6 :   const size_t size = strtoul(string, NULL, 10);
      14                 :            : 
      15         [ +  - ]:          6 :   return size < min ? min : size > max ? max : size;
      16                 :            : }
      17                 :            : 
      18                 :            : #endif // ZIX_TEST_ARGS_H

Generated by: LCOV version 1.16