tests: Fix default_scale test

It was only testing for the first item in all cases, instead
of going through all of them.

Fixes: a6217c720e ("tests: Add tests for monitor_calculate_mode_scale")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2880>
This commit is contained in:
Carlos Garnacho 2023-03-01 09:35:53 +01:00 committed by Marge Bot
parent b0207f9567
commit bf8027ef0d

View File

@ -9323,7 +9323,6 @@ meta_test_monitor_calculate_mode_scale (void)
.exp_nofrac = 1.0, .exp_nofrac = 1.0,
}, },
}; };
static const int n_cases = 1;
/* Set a rather high scale epsilon, to have "easy" scales as the /* Set a rather high scale epsilon, to have "easy" scales as the
* expectations, while ignoring that the actual scaling factors are slightly * expectations, while ignoring that the actual scaling factors are slightly
* different, e.g. 1.74863386 instead of 1.75. * 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 = meta_backend_get_monitor_manager (test_backend);
manager_test = META_MONITOR_MANAGER_TEST (manager); 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; MonitorTestCaseSetup test_case_setup = base_test_case_setup;
MetaMonitorTestSetup *test_setup; MetaMonitorTestSetup *test_setup;