Skip to content

Commit c2c3f75

Browse files
nashifkartben
authored andcommitted
tests: lib: fix doxygen groups
Group test using doxygen and general fixes to structure. Signed-off-by: Anas Nashif <[email protected]>
1 parent e5f841c commit c2c3f75

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

tests/lib/c_lib/common/src/main.c

+11-12
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ volatile long long_max = LONG_MAX;
6565
volatile long long_one = 1L;
6666

6767
/**
68-
*
6968
* @brief Test implementation-defined constants library
70-
* @defgroup libc_api
69+
* @defgroup libc_api C Library APIs
7170
* @ingroup all_tests
7271
* @{
7372
*
7473
*/
75-
74+
/**
75+
* @brief Test c library limits
76+
*/
7677
ZTEST(libc_common, test_limits)
7778
{
78-
7979
zassert_true((long_max + long_one == LONG_MIN));
8080
}
8181

@@ -84,13 +84,15 @@ static ssize_t foobar(void)
8484
return -1;
8585
}
8686

87+
/**
88+
* @brief Test C library ssize_t
89+
*/
8790
ZTEST(libc_common, test_ssize_t)
8891
{
8992
zassert_true(foobar() < 0);
9093
}
9194

9295
/**
93-
*
9496
* @brief Test boolean types and values library
9597
*
9698
*/
@@ -110,7 +112,6 @@ volatile long long_variable;
110112
volatile size_t size_of_long_variable = sizeof(long_variable);
111113

112114
/**
113-
*
114115
* @brief Test standard type definitions library
115116
*
116117
*/
@@ -132,7 +133,6 @@ volatile uint8_t unsigned_byte = 0xff;
132133
volatile uint32_t unsigned_int = 0xffffff00;
133134

134135
/**
135-
*
136136
* @brief Test integer types library
137137
*
138138
*/
@@ -157,7 +157,6 @@ ZTEST(libc_common, test_stdint)
157157
}
158158

159159
/**
160-
*
161160
* @brief Test time_t to make sure it is at least 64 bits
162161
*
163162
*/
@@ -179,7 +178,6 @@ ZTEST(libc_common, test_time_t)
179178
char buffer[BUFSIZE];
180179

181180
/**
182-
*
183181
* @brief Test string memset
184182
*
185183
*/
@@ -199,7 +197,6 @@ ZTEST(libc_common, test_memset)
199197
}
200198

201199
/**
202-
*
203200
* @brief Test string length function
204201
*
205202
* @see strlen(), strnlen().
@@ -216,7 +213,6 @@ ZTEST(libc_common, test_strlen)
216213
}
217214

218215
/**
219-
*
220216
* @brief Test string compare function
221217
*
222218
* @see strcmp(), strncasecmp().
@@ -669,7 +665,7 @@ ZTEST(libc_common, test_str_operate)
669665
*
670666
* @brief test strtol function
671667
*
672-
* @detail in 32bit system:
668+
* @details in 32bit system:
673669
* when base is 10, [-2147483648..2147483647]
674670
* in 64bit system:
675671
* when base is 10,
@@ -1330,3 +1326,6 @@ ZTEST(libc_common, test_exit)
13301326
zassert_equal(a, 0, "exit failed");
13311327
#endif
13321328
}
1329+
/**
1330+
* @}
1331+
*/

tests/lib/mem_alloc/src/main.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ TOOLCHAIN_DISABLE_GCC_WARNING(TOOLCHAIN_WARNING_ALLOC_SIZE_LARGER_THAN)
3535
/**
3636
*
3737
* @brief Test implementation-defined constants library
38-
* @defgroup libc_api
39-
* @ingroup all_tests
38+
* @ingroup libc_api
4039
* @{
4140
*
4241
*/
@@ -349,10 +348,6 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_all)
349348
reloc_ptr = NULL;
350349
}
351350

352-
/**
353-
* @}
354-
*/
355-
356351
/**
357352
*
358353
* @brief Test dynamic memory allocation upto maximum size
@@ -375,4 +370,8 @@ ZTEST(c_lib_dynamic_memalloc, test_memalloc_max)
375370
}
376371
#endif
377372

373+
/**
374+
* @}
375+
*/
376+
378377
ZTEST_SUITE(c_lib_dynamic_memalloc, NULL, NULL, NULL, NULL, NULL);

tests/lib/sprintf/src/main.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
/**
2020
*
2121
* @brief Test implementation-defined constants library
22-
* @defgroup libc_api
23-
* @ingroup all_tests
22+
* @ingroup libc_api
2423
* @{
2524
*
2625
*/

0 commit comments

Comments
 (0)