LCOV - code coverage report
Current view: top level - libs/mem/tests/src - test_libmem_0032.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 11 11
Test Date: 2026-07-12 01:01:34 Functions: 100.0 % 1 1
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #include "test_libmem_all.h"
       2                 :             : 
       3                 :             : /**
       4                 :             :  * @brief Check unbounded mode ignores the size argument
       5                 :             :  *
       6                 :             :  * @return Return describing success or failure
       7                 :             :  */
       8                 :           1 : Return test_libmem_0032(void)
       9                 :             : {
      10                 :           1 :         INITTEST;
      11                 :             : 
      12                 :             :         static const char base_text[] = "base";
      13                 :           1 :         m_create(char,string_buffer);
      14                 :           1 :         ASSERT(SUCCESS == m_to_string(string_buffer));
      15                 :             : 
      16                 :             :         static const char suffix[] = "suffix";
      17                 :             : 
      18                 :           1 :         ASSERT(SUCCESS == m_copy_fixed_string(string_buffer,sizeof(base_text),base_text));
      19                 :           1 :         ASSERT(SUCCESS == mem_core_string(SOURCE_UNBOUNDED_STRING | TRANSFER_APPEND,string_buffer,1,suffix));
      20                 :           1 :         ASSERT(0 == strcmp(m_text(string_buffer),"basesuffix"));
      21                 :           1 :         ASSERT(string_buffer->string_length == strlen("basesuffix"));
      22                 :           1 :         ASSERT(string_buffer->is_string == true);
      23                 :           1 :         call(m_del(string_buffer));
      24                 :             : 
      25                 :           1 :         RETURN_STATUS;
      26                 :             : }
        

Generated by: LCOV version 2.0-1