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:
parent
e5f841c183
commit
c2c3f7570f
3 changed files with 17 additions and 20 deletions
|
@ -65,17 +65,17 @@ volatile long long_max = LONG_MAX;
|
||||||
volatile long long_one = 1L;
|
volatile long long_one = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test implementation-defined constants library
|
* @brief Test implementation-defined constants library
|
||||||
* @defgroup libc_api
|
* @defgroup libc_api C Library APIs
|
||||||
* @ingroup all_tests
|
* @ingroup all_tests
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @brief Test c library limits
|
||||||
|
*/
|
||||||
ZTEST(libc_common, test_limits)
|
ZTEST(libc_common, test_limits)
|
||||||
{
|
{
|
||||||
|
|
||||||
zassert_true((long_max + long_one == LONG_MIN));
|
zassert_true((long_max + long_one == LONG_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,13 +84,15 @@ static ssize_t foobar(void)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Test C library ssize_t
|
||||||
|
*/
|
||||||
ZTEST(libc_common, test_ssize_t)
|
ZTEST(libc_common, test_ssize_t)
|
||||||
{
|
{
|
||||||
zassert_true(foobar() < 0);
|
zassert_true(foobar() < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test boolean types and values library
|
* @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);
|
volatile size_t size_of_long_variable = sizeof(long_variable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test standard type definitions library
|
* @brief Test standard type definitions library
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -132,7 +133,6 @@ volatile uint8_t unsigned_byte = 0xff;
|
||||||
volatile uint32_t unsigned_int = 0xffffff00;
|
volatile uint32_t unsigned_int = 0xffffff00;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test integer types library
|
* @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
|
* @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];
|
char buffer[BUFSIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test string memset
|
* @brief Test string memset
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -199,7 +197,6 @@ ZTEST(libc_common, test_memset)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test string length function
|
* @brief Test string length function
|
||||||
*
|
*
|
||||||
* @see strlen(), strnlen().
|
* @see strlen(), strnlen().
|
||||||
|
@ -216,7 +213,6 @@ ZTEST(libc_common, test_strlen)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @brief Test string compare function
|
* @brief Test string compare function
|
||||||
*
|
*
|
||||||
* @see strcmp(), strncasecmp().
|
* @see strcmp(), strncasecmp().
|
||||||
|
@ -669,7 +665,7 @@ ZTEST(libc_common, test_str_operate)
|
||||||
*
|
*
|
||||||
* @brief test strtol function
|
* @brief test strtol function
|
||||||
*
|
*
|
||||||
* @detail in 32bit system:
|
* @details in 32bit system:
|
||||||
* when base is 10, [-2147483648..2147483647]
|
* when base is 10, [-2147483648..2147483647]
|
||||||
* in 64bit system:
|
* in 64bit system:
|
||||||
* when base is 10,
|
* when base is 10,
|
||||||
|
@ -1330,3 +1326,6 @@ ZTEST(libc_common, test_exit)
|
||||||
zassert_equal(a, 0, "exit failed");
|
zassert_equal(a, 0, "exit failed");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
|
@ -35,8 +35,7 @@ TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_ALLOC_SIZE_LARGER_THAN)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @brief Test implementation-defined constants library
|
* @brief Test implementation-defined constants library
|
||||||
* @defgroup libc_api
|
* @ingroup libc_api
|
||||||
* @ingroup all_tests
|
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -349,10 +348,6 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_all)
|
||||||
reloc_ptr = NULL;
|
reloc_ptr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @brief Test dynamic memory allocation upto maximum size
|
* @brief Test dynamic memory allocation upto maximum size
|
||||||
|
@ -375,4 +370,8 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_max)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
ZTEST_SUITE(c_lib_dynamic_memalloc, NULL, NULL, NULL, NULL, NULL);
|
ZTEST_SUITE(c_lib_dynamic_memalloc, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @brief Test implementation-defined constants library
|
* @brief Test implementation-defined constants library
|
||||||
* @defgroup libc_api
|
* @ingroup libc_api
|
||||||
* @ingroup all_tests
|
|
||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue