LCOV - code coverage report
Current view: top level - test - integer_test_utils.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 4 4 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: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright 2019-2026 David Robillard <d@drobilla.net>
       2                 :            : // SPDX-License-Identifier: ISC
       3                 :            : 
       4                 :            : #ifndef EXESS_TEST_INTEGER_TEST_UTILS_H
       5                 :            : #define EXESS_TEST_INTEGER_TEST_UTILS_H
       6                 :            : 
       7                 :            : #include <exess/exess.h>
       8                 :            : 
       9                 :            : #include <assert.h>
      10                 :            : #include <stddef.h>
      11                 :            : #include <stdint.h>
      12                 :            : 
      13                 :            : static inline size_t
      14                 :       4134 : set_integer_value(const size_t  value_size,
      15                 :            :                   void* const   value,
      16                 :            :                   const int64_t number)
      17                 :            : {
      18                 :       4134 :   const ExessResult r = exess_coerce_value(
      19                 :            :     0U, EXESS_LONG, sizeof(number), &number, EXESS_INTEGER, value_size, value);
      20                 :            : 
      21         [ -  + ]:       4134 :   assert(!r.status);
      22                 :       4134 :   return r.count;
      23                 :            : }
      24                 :            : 
      25                 :            : #endif // EXESS_TEST_INTEGER_TEST_UTILS_H

Generated by: LCOV version 1.16