Skip to content

Commit d67df16

Browse files
committed
test: unify ut names
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
1 parent ff22d80 commit d67df16

4 files changed

Lines changed: 17 additions & 16 deletions

File tree

test/cmocka/src/audio/component/comp_set_state.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ struct test_case {
5454

5555
#define TEST_CASE(type, in_state, cmd, out_state) \
5656
{(type), (in_state), (cmd), (out_state), \
57-
("comp_set_state__" #type "__" #in_state "__" #cmd "__" #out_state)}
57+
("test_audio_component_comp_set_state__" \
58+
#type "__" #in_state "__" #cmd "__" #out_state)}
5859

5960

6061
/*
@@ -213,7 +214,7 @@ static void test_audio_component_comp_set_state_fail(struct test_case *tc)
213214
assert_int_equal(comp_set_state(&test_drv, tc->cmd), -EINVAL);
214215
}
215216

216-
static void test_comp_set_state(void **state)
217+
static void test_audio_component_comp_set_state(void **state)
217218
{
218219
struct test_case *tc = *((struct test_case **) state);
219220

@@ -240,7 +241,7 @@ int main(void)
240241
struct CMUnitTest *t = &tests[i];
241242

242243
t->name = test_cases[i].name;
243-
t->test_func = test_comp_set_state;
244+
t->test_func = test_audio_component_comp_set_state;
244245
t->initial_state = &test_cases[i];
245246
t->setup_func = NULL;
246247
t->teardown_func = NULL;

test/cmocka/src/audio/mixer/mixer_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct mix_test_case {
8888
{ \
8989
.num_sources = (_num_sources), \
9090
.num_chans = (_num_chans), \
91-
.name = ("mixer_copy_" \
91+
.name = ("test_audio_mixer_copy_" \
9292
#_num_sources "_srcs_" \
9393
#_num_chans "ch"), \
9494
.sources = NULL \

test/cmocka/src/audio/volume/volume_process.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static void verify_s32_to_s24_s32(struct comp_dev *dev,
280280
}
281281
}
282282

283-
static void test_vol(void **state)
283+
static void test_audio_vol(void **state)
284284
{
285285
struct vol_test_state *vol_state = *state;
286286
struct comp_data *cd = comp_get_drvdata(vol_state->dev);
@@ -340,8 +340,8 @@ int main(void)
340340
struct CMUnitTest tests[ARRAY_SIZE(parameters)];
341341

342342
for (i = 0; i < ARRAY_SIZE(parameters); i++) {
343-
tests[i].name = "test_vol";
344-
tests[i].test_func = test_vol;
343+
tests[i].name = "test_audio_vol";
344+
tests[i].test_func = test_audio_vol;
345345
tests[i].setup_func = setup;
346346
tests[i].teardown_func = teardown;
347347
tests[i].initial_state = &parameters[i];

test/cmocka/src/lib/alloc/alloc.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct test_case {
5656

5757
#define TEST_CASE(bytes, zone, caps, num, type, name_base) \
5858
{(bytes), (zone), (caps), (num), (type), \
59-
(name_base "__" #zone "__" #bytes "x" #num)}
59+
("test_lib_alloc_" name_base "__" #zone "__" #bytes "x" #num)}
6060

6161
static struct test_case test_cases[] = {
6262
/*
@@ -236,7 +236,7 @@ static void *alloc(struct test_case *tc)
236236
return mem;
237237
}
238238

239-
static void test_alloc_bulk_free(struct test_case *tc)
239+
static void test_lib_alloc_bulk_free(struct test_case *tc)
240240
{
241241
void **all_mem = malloc(sizeof(void *) * tc->alloc_num);
242242
int i;
@@ -254,7 +254,7 @@ static void test_alloc_bulk_free(struct test_case *tc)
254254
rfree(all_mem);
255255
}
256256

257-
static void test_alloc_immediate_free(struct test_case *tc)
257+
static void test_lib_alloc_immediate_free(struct test_case *tc)
258258
{
259259
int i;
260260

@@ -266,7 +266,7 @@ static void test_alloc_immediate_free(struct test_case *tc)
266266
}
267267
}
268268

269-
static void test_alloc_zero(struct test_case *tc)
269+
static void test_lib_alloc_zero(struct test_case *tc)
270270
{
271271
void **all_mem = malloc(sizeof(void *) * tc->alloc_num);
272272
int i;
@@ -289,21 +289,21 @@ static void test_alloc_zero(struct test_case *tc)
289289
rfree(all_mem);
290290
}
291291

292-
static void test_alloc(void **state)
292+
static void test_lib_alloc(void **state)
293293
{
294294
struct test_case *tc = *((struct test_case **)state);
295295

296296
switch (tc->type) {
297297
case TEST_BULK:
298-
test_alloc_bulk_free(tc);
298+
test_lib_alloc_bulk_free(tc);
299299
break;
300300

301301
case TEST_ZERO:
302-
test_alloc_zero(tc);
302+
test_lib_alloc_zero(tc);
303303
break;
304304

305305
case TEST_IMMEDIATE_FREE:
306-
test_alloc_immediate_free(tc);
306+
test_lib_alloc_immediate_free(tc);
307307
break;
308308
}
309309
}
@@ -318,7 +318,7 @@ int main(void)
318318
struct CMUnitTest *t = &tests[i];
319319

320320
t->name = test_cases[i].name;
321-
t->test_func = test_alloc;
321+
t->test_func = test_lib_alloc;
322322
t->initial_state = &test_cases[i];
323323
t->setup_func = NULL;
324324
t->teardown_func = NULL;

0 commit comments

Comments
 (0)