From bf8027ef0dd79206f836d173f6bcea85655f63dc Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 1 Mar 2023 09:35:53 +0100 Subject: [PATCH] tests: Fix default_scale test It was only testing for the first item in all cases, instead of going through all of them. Fixes: a6217c720e4f ("tests: Add tests for monitor_calculate_mode_scale") Part-of: --- src/tests/monitor-unit-tests.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c index 64dcff77b..8fbeeec9c 100644 --- a/src/tests/monitor-unit-tests.c +++ b/src/tests/monitor-unit-tests.c @@ -9323,7 +9323,6 @@ meta_test_monitor_calculate_mode_scale (void) .exp_nofrac = 1.0, }, }; - static const int n_cases = 1; /* Set a rather high scale epsilon, to have "easy" scales as the * expectations, while ignoring that the actual scaling factors are slightly * different, e.g. 1.74863386 instead of 1.75. @@ -9336,7 +9335,7 @@ meta_test_monitor_calculate_mode_scale (void) manager = meta_backend_get_monitor_manager (test_backend); manager_test = META_MONITOR_MANAGER_TEST (manager); - for (int i = 0; i < n_cases; i++) + for (int i = 0; i < G_N_ELEMENTS (cases); i++) { MonitorTestCaseSetup test_case_setup = base_test_case_setup; MetaMonitorTestSetup *test_setup;