mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
tests/monitor-unit-tests: Sanity check some monitor info
Check that some information about the monitor is the same as the main output they are derived from. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>
This commit is contained in:
parent
432682f305
commit
b883a31796
@ -164,6 +164,7 @@ int meta_output_get_backlight (MetaOutput *output);
|
||||
void meta_output_add_possible_clone (MetaOutput *output,
|
||||
MetaOutput *possible_clone);
|
||||
|
||||
META_EXPORT_TEST
|
||||
const MetaOutputInfo * meta_output_get_info (MetaOutput *output);
|
||||
|
||||
META_EXPORT_TEST
|
||||
|
@ -365,6 +365,8 @@ check_monitor_configuration (MonitorTestCaseExpect *expect)
|
||||
for (l = monitors, i = 0; l; l = l->next, i++)
|
||||
{
|
||||
MetaMonitor *monitor = l->data;
|
||||
MetaOutput *main_output;
|
||||
const MetaOutputInfo *main_output_info;
|
||||
GList *outputs;
|
||||
GList *l_output;
|
||||
int j;
|
||||
@ -400,6 +402,19 @@ check_monitor_configuration (MonitorTestCaseExpect *expect)
|
||||
==,
|
||||
expect->monitors[i].height_mm);
|
||||
|
||||
main_output = meta_monitor_get_main_output (monitor);
|
||||
main_output_info = meta_output_get_info (main_output);
|
||||
g_assert_cmpstr (meta_monitor_get_connector (monitor), ==,
|
||||
main_output_info->name);
|
||||
g_assert_cmpstr (meta_monitor_get_vendor (monitor), ==,
|
||||
main_output_info->vendor);
|
||||
g_assert_cmpstr (meta_monitor_get_product (monitor), ==,
|
||||
main_output_info->product);
|
||||
g_assert_cmpstr (meta_monitor_get_serial (monitor), ==,
|
||||
main_output_info->serial);
|
||||
g_assert_cmpint (meta_monitor_get_connector_type (monitor), ==,
|
||||
main_output_info->connector_type);
|
||||
|
||||
modes = meta_monitor_get_modes (monitor);
|
||||
g_assert_cmpint (g_list_length (modes),
|
||||
==,
|
||||
|
Loading…
Reference in New Issue
Block a user