test: switch the resolution capabilities to an array

Just like the profile ones

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2019-07-25 14:58:42 +10:00
committed by Filipe Laíns
parent 11c1e2d71a
commit 7fec19f8f2
3 changed files with 14 additions and 8 deletions

View File

@@ -214,7 +214,10 @@ test_read_profile(struct ratbag_profile *profile)
res->is_default = r->dflt;
if (r->dflt)
default_set = true;
ratbag_resolution_set_cap(res, r->caps);
for (size_t j = 0; j < ARRAY_LENGTH(r->caps) && r->caps[j]; j++) {
ratbag_resolution_set_cap(res, r->caps[j]);
}
}
/* special case triggered by the test suite when num_resolutions is 0 */

View File

@@ -53,7 +53,7 @@ struct ratbag_test_resolution {
int xres, yres;
bool active;
bool dflt;
uint32_t caps;
uint32_t caps[10];
int dpi_min, dpi_max;
};