Skip to content

Commit

Permalink
Give cross test a logical name
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenuni committed Oct 30, 2024
1 parent 3568f5b commit 9687d70
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions tests/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ add_suites_to_registry(void)
if (error)
return error;

error = add_cross_suite();
if (error)
return error;

error = add_image_suite();
if (error)
return error;
Expand Down Expand Up @@ -137,10 +141,6 @@ add_suites_to_registry(void)
if (error)
return error;

error = add_visual_stimuli_suite();
if (error)
return error;

error = add_vector_suite();
if (error)
return error;
Expand Down
2 changes: 1 addition & 1 deletion tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ unit_test = executable (
'test-audio-utils.c',
'test-canvas.c',
'test-color.c',
'test-cross.c',
'test-image.c',
'test-gl-canvas.c',
'test-gl-utils.c',
Expand All @@ -87,7 +88,6 @@ unit_test = executable (
'test-utility.c',
'test-wave.c',
'test-visual-stimulus.c',
'test-visual-stimuli.c',
'unit-test-utilities.c',
'vector-test.c',
'vector3-test.c',
Expand Down
6 changes: 3 additions & 3 deletions tests/suites.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ add_canvas_suite(void);
int
add_color_suite(void);

int
add_cross_suite(void);

int
add_image_suite(void);

Expand Down Expand Up @@ -57,9 +60,6 @@ add_utility_suite(void);
int
add_visual_stimulus_suite(void);

int
add_visual_stimuli_suite(void);

int
add_vector_suite(void);

Expand Down
9 changes: 4 additions & 5 deletions tests/test-visual-stimuli.c → tests/test-cross.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static PsyColor *g_bg_color = NULL;
static PsyTimePoint *g_tp_start = NULL;

static int
visual_stimuli_setup(void)
cross_setup(void)
{
set_log_handler_file("test-visual-stimuli.txt");
g_debug("Entering %s", __func__);
Expand Down Expand Up @@ -48,7 +48,7 @@ visual_stimuli_setup(void)
}

static int
visual_stimuli_teardown(void)
cross_teardown(void)
{
g_debug("Entering %s", __func__);
g_clear_object(&g_canvas);
Expand Down Expand Up @@ -219,10 +219,9 @@ cross_specific_values(void)
}

int
add_visual_stimuli_suite(void)
add_cross_suite(void)
{
CU_Suite *suite = CU_add_suite(
"Visual stimuli suite", visual_stimuli_setup, visual_stimuli_teardown);
CU_Suite *suite = CU_add_suite("Cross suite", cross_setup, cross_teardown);

CU_Test *test = NULL;

Expand Down

0 comments on commit 9687d70

Please sign in to comment.