tests: lib: fix doxygen groups

Group test using doxygen and general fixes to structure.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2025-04-21 08:50:56 -04:00 committed by Benjamin Cabé
commit c2c3f7570f
3 changed files with 17 additions and 20 deletions

View file

@ -65,17 +65,17 @@ volatile long long_max = LONG_MAX;
volatile long long_one = 1L;
/**
*
* @brief Test implementation-defined constants library
* @defgroup libc_api
* @defgroup libc_api C Library APIs
* @ingroup all_tests
* @{
*
*/
/**
* @brief Test c library limits
*/
ZTEST(libc_common, test_limits)
{
zassert_true((long_max + long_one == LONG_MIN));
}
@ -84,13 +84,15 @@ static ssize_t foobar(void)
return -1;
}
/**
* @brief Test C library ssize_t
*/
ZTEST(libc_common, test_ssize_t)
{
zassert_true(foobar() < 0);
}
/**
*
* @brief Test boolean types and values library
*
*/
@ -110,7 +112,6 @@ volatile long long_variable;
volatile size_t size_of_long_variable = sizeof(long_variable);
/**
*
* @brief Test standard type definitions library
*
*/
@ -132,7 +133,6 @@ volatile uint8_t unsigned_byte = 0xff;
volatile uint32_t unsigned_int = 0xffffff00;
/**
*
* @brief Test integer types library
*
*/
@ -157,7 +157,6 @@ ZTEST(libc_common, test_stdint)
}
/**
*
* @brief Test time_t to make sure it is at least 64 bits
*
*/
@ -179,7 +178,6 @@ ZTEST(libc_common, test_time_t)
char buffer[BUFSIZE];
/**
*
* @brief Test string memset
*
*/
@ -199,7 +197,6 @@ ZTEST(libc_common, test_memset)
}
/**
*
* @brief Test string length function
*
* @see strlen(), strnlen().
@ -216,7 +213,6 @@ ZTEST(libc_common, test_strlen)
}
/**
*
* @brief Test string compare function
*
* @see strcmp(), strncasecmp().
@ -669,7 +665,7 @@ ZTEST(libc_common, test_str_operate)
*
* @brief test strtol function
*
* @detail in 32bit system:
* @details in 32bit system:
* when base is 10, [-2147483648..2147483647]
* in 64bit system:
* when base is 10,
@ -1330,3 +1326,6 @@ ZTEST(libc_common, test_exit)
zassert_equal(a, 0, "exit failed");
#endif
}
/**
* @}
*/

View file

@ -35,8 +35,7 @@ TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_ALLOC_SIZE_LARGER_THAN)
/**
*
* @brief Test implementation-defined constants library
* @defgroup libc_api
* @ingroup all_tests
* @ingroup libc_api
* @{
*
*/
@ -349,10 +348,6 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_all)
reloc_ptr = NULL;
}
/**
* @}
*/
/**
*
* @brief Test dynamic memory allocation upto maximum size
@ -375,4 +370,8 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_max)
}
#endif
/**
* @}
*/
ZTEST_SUITE(c_lib_dynamic_memalloc, NULL, NULL, NULL, NULL, NULL);

View file

@ -19,8 +19,7 @@
/**
*
* @brief Test implementation-defined constants library
* @defgroup libc_api
* @ingroup all_tests
* @ingroup libc_api
* @{
*
*/