[mutter] tests/monitor-unit-tests: Use TestCaseExpect for checking configuration
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/monitor-unit-tests: Use TestCaseExpect for checking configuration
- Date: Wed, 13 May 2020 08:56:02 +0000 (UTC)
commit 531b0ab300368f3ffd15149b97484a9a0a839873
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri May 8 21:10:12 2020 +0200
tests/monitor-unit-tests: Use TestCaseExpect for checking configuration
Similar to the last commit, allow checking configurations without
passing the whole MonitorTestCase, but instead only the
MonitorTestCaseExpect object.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1243
src/tests/monitor-unit-tests.c | 175 ++++++++++++++++++++---------------------
1 file changed, 87 insertions(+), 88 deletions(-)
---
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index f639149fa..561aae4f7 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -550,8 +550,7 @@ logical_monitor_from_layout (MetaMonitorManager *monitor_manager,
}
static void
-check_logical_monitor (MonitorTestCase *test_case,
- MetaMonitorManager *monitor_manager,
+check_logical_monitor (MetaMonitorManager *monitor_manager,
MonitorTestCaseLogicalMonitor *test_logical_monitor)
{
MetaLogicalMonitor *logical_monitor;
@@ -633,7 +632,7 @@ check_logical_monitor (MonitorTestCase *test_case,
}
static void
-check_monitor_configuration (MonitorTestCase *test_case)
+check_monitor_configuration (MonitorTestCaseExpect *expect)
{
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
@@ -650,27 +649,27 @@ check_monitor_configuration (MonitorTestCase *test_case)
g_assert_cmpint (monitor_manager->screen_width,
==,
- test_case->expect.screen_width);
+ expect->screen_width);
g_assert_cmpint (monitor_manager->screen_height,
==,
- test_case->expect.screen_height);
+ expect->screen_height);
g_assert_cmpint ((int) g_list_length (meta_gpu_get_outputs (gpu)),
==,
- test_case->expect.n_outputs);
+ expect->n_outputs);
g_assert_cmpint ((int) g_list_length (meta_gpu_get_crtcs (gpu)),
==,
- test_case->expect.n_crtcs);
+ expect->n_crtcs);
tiled_monitor_count =
meta_monitor_manager_test_get_tiled_monitor_count (monitor_manager_test);
g_assert_cmpint (tiled_monitor_count,
==,
- test_case->expect.n_tiled_monitors);
+ expect->n_tiled_monitors);
monitors = meta_monitor_manager_get_monitors (monitor_manager);
g_assert_cmpint ((int) g_list_length (monitors),
==,
- test_case->expect.n_monitors);
+ expect->n_monitors);
for (l = monitors, i = 0; l; l = l->next, i++)
{
MetaMonitor *monitor = l->data;
@@ -688,15 +687,15 @@ check_monitor_configuration (MonitorTestCase *test_case)
g_assert_cmpint ((int) g_list_length (outputs),
==,
- test_case->expect.monitors[i].n_outputs);
+ expect->monitors[i].n_outputs);
for (l_output = outputs, j = 0; l_output; l_output = l_output->next, j++)
{
MetaOutput *output = l_output->data;
- uint64_t winsys_id = test_case->expect.monitors[i].outputs[j];
+ uint64_t winsys_id = expect->monitors[i].outputs[j];
g_assert (output == output_from_winsys_id (backend, winsys_id));
- g_assert_cmpint (test_case->expect.monitors[i].is_underscanning,
+ g_assert_cmpint (expect->monitors[i].is_underscanning,
==,
output->is_underscanning);
}
@@ -704,15 +703,15 @@ check_monitor_configuration (MonitorTestCase *test_case)
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
g_assert_cmpint (width_mm,
==,
- test_case->expect.monitors[i].width_mm);
+ expect->monitors[i].width_mm);
g_assert_cmpint (height_mm,
==,
- test_case->expect.monitors[i].height_mm);
+ expect->monitors[i].height_mm);
modes = meta_monitor_get_modes (monitor);
g_assert_cmpint (g_list_length (modes),
==,
- test_case->expect.monitors[i].n_modes);
+ expect->monitors[i].n_modes);
for (l_mode = modes, j = 0; l_mode; l_mode = l_mode->next, j++)
{
@@ -729,21 +728,21 @@ check_monitor_configuration (MonitorTestCase *test_case)
g_assert_cmpint (width,
==,
- test_case->expect.monitors[i].modes[j].width);
+ expect->monitors[i].modes[j].width);
g_assert_cmpint (height,
==,
- test_case->expect.monitors[i].modes[j].height);
+ expect->monitors[i].modes[j].height);
g_assert_cmpfloat (refresh_rate,
==,
- test_case->expect.monitors[i].modes[j].refresh_rate);
+ expect->monitors[i].modes[j].refresh_rate);
g_assert_cmpint (flags,
==,
- test_case->expect.monitors[i].modes[j].flags);
+ expect->monitors[i].modes[j].flags);
data = (CheckMonitorModeData) {
.backend = backend,
.expect_crtc_mode_iter =
- test_case->expect.monitors[i].modes[j].crtc_modes
+ expect->monitors[i].modes[j].crtc_modes
};
meta_monitor_mode_foreach_output (monitor, mode,
check_monitor_mode,
@@ -752,7 +751,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
}
current_mode = meta_monitor_get_current_mode (monitor);
- expected_current_mode_index = test_case->expect.monitors[i].current_mode;
+ expected_current_mode_index = expect->monitors[i].current_mode;
if (expected_current_mode_index == -1)
expected_current_mode = NULL;
else
@@ -772,7 +771,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
data = (CheckMonitorModeData) {
.backend = backend,
.expect_crtc_mode_iter =
- test_case->expect.monitors[i].modes[expected_current_mode_index].crtc_modes
+ expect->monitors[i].modes[expected_current_mode_index].crtc_modes
};
meta_monitor_mode_foreach_output (monitor, expected_current_mode,
check_current_monitor_mode,
@@ -788,7 +787,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
meta_monitor_manager_get_num_logical_monitors (monitor_manager);
g_assert_cmpint (n_logical_monitors,
==,
- test_case->expect.n_logical_monitors);
+ expect->n_logical_monitors);
/*
* Check that we have a primary logical monitor (except for headless),
@@ -796,7 +795,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
* that is marked as primary (further below). Note: outputs being primary or
* not only matters on X11.
*/
- if (test_case->expect.primary_logical_monitor == -1)
+ if (expect->primary_logical_monitor == -1)
{
g_assert_null (monitor_manager->primary_logical_monitor);
g_assert_null (monitor_manager->logical_monitors);
@@ -804,7 +803,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
else
{
MonitorTestCaseLogicalMonitor *test_logical_monitor =
- &test_case->expect.logical_monitors[test_case->expect.primary_logical_monitor];
+ &expect->logical_monitors[expect->primary_logical_monitor];
MetaLogicalMonitor *logical_monitor;
logical_monitor =
@@ -813,12 +812,12 @@ check_monitor_configuration (MonitorTestCase *test_case)
g_assert (logical_monitor == monitor_manager->primary_logical_monitor);
}
- for (i = 0; i < test_case->expect.n_logical_monitors; i++)
+ for (i = 0; i < expect->n_logical_monitors; i++)
{
MonitorTestCaseLogicalMonitor *test_logical_monitor =
- &test_case->expect.logical_monitors[i];
+ &expect->logical_monitors[i];
- check_logical_monitor (test_case, monitor_manager, test_logical_monitor);
+ check_logical_monitor (monitor_manager, test_logical_monitor);
}
g_assert_cmpint (n_logical_monitors, ==, i);
@@ -828,7 +827,7 @@ check_monitor_configuration (MonitorTestCase *test_case)
MetaCrtc *crtc = l->data;
MetaCrtcConfig *crtc_config = crtc->config;
- if (test_case->expect.crtcs[i].current_mode == -1)
+ if (expect->crtcs[i].current_mode == -1)
{
g_assert_null (crtc_config);
}
@@ -840,18 +839,18 @@ check_monitor_configuration (MonitorTestCase *test_case)
expected_current_mode =
g_list_nth_data (meta_gpu_get_modes (gpu),
- test_case->expect.crtcs[i].current_mode);
+ expect->crtcs[i].current_mode);
g_assert (crtc_config->mode == expected_current_mode);
g_assert_cmpuint (crtc_config->transform,
==,
- test_case->expect.crtcs[i].transform);
+ expect->crtcs[i].transform);
g_assert_cmpfloat_with_epsilon (crtc_config->layout.origin.x,
- test_case->expect.crtcs[i].x,
+ expect->crtcs[i].x,
FLT_EPSILON);
g_assert_cmpfloat_with_epsilon (crtc_config->layout.origin.y,
- test_case->expect.crtcs[i].y,
+ expect->crtcs[i].y,
FLT_EPSILON);
}
}
@@ -1021,7 +1020,7 @@ create_monitor_test_setup (MonitorTestCaseSetup *setup,
static void
meta_test_monitor_initial_linear_config (void)
{
- check_monitor_configuration (&initial_test_case);
+ check_monitor_configuration (&initial_test_case.expect);
}
static void
@@ -1097,7 +1096,7 @@ meta_test_monitor_one_disconnected_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1215,7 +1214,7 @@ meta_test_monitor_one_off_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1335,7 +1334,7 @@ meta_test_monitor_preferred_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1464,7 +1463,7 @@ meta_test_monitor_tiled_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1637,7 +1636,7 @@ meta_test_monitor_tiled_non_preferred_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1786,7 +1785,7 @@ meta_test_monitor_tiled_non_main_origin_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -1932,7 +1931,7 @@ meta_test_monitor_hidpi_linear_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2090,7 +2089,7 @@ meta_test_monitor_suggested_config (void)
0, 0);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2216,7 +2215,7 @@ meta_test_monitor_limited_crtcs (void)
emulate_hotplug (test_setup);
g_test_assert_expected_messages ();
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2353,7 +2352,7 @@ meta_test_monitor_lid_switch_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
meta_monitor_manager_lid_is_closed_changed (monitor_manager);
@@ -2370,7 +2369,7 @@ meta_test_monitor_lid_switch_config (void)
test_case.expect.crtcs[0].current_mode = -1;
test_case.expect.crtcs[1].x = 0;
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
meta_monitor_manager_lid_is_closed_changed (monitor_manager);
@@ -2390,7 +2389,7 @@ meta_test_monitor_lid_switch_config (void)
test_case.expect.crtcs[1].current_mode = 0;
test_case.expect.crtcs[1].x = 1024;
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2528,7 +2527,7 @@ meta_test_monitor_lid_opened_config (void)
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
meta_monitor_manager_lid_is_closed_changed (monitor_manager);
@@ -2541,7 +2540,7 @@ meta_test_monitor_lid_opened_config (void)
test_case.expect.crtcs[1].current_mode = 0;
test_case.expect.crtcs[1].x = 0;
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2634,7 +2633,7 @@ meta_test_monitor_lid_closed_no_external (void)
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2777,7 +2776,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* External monitor connected */
@@ -2792,7 +2791,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* Lid closed */
@@ -2807,7 +2806,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
MONITOR_TEST_FLAG_NO_STORED);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/*
* The second part of this test emulate the following:
@@ -2831,7 +2830,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
MONITOR_TEST_FLAG_NO_STORED);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* External monitor disconnected */
@@ -2845,7 +2844,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* Lid closed */
@@ -2857,7 +2856,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
MONITOR_TEST_FLAG_NO_STORED);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* Lid opened */
@@ -2865,7 +2864,7 @@ meta_test_monitor_lid_closed_with_hotplugged_external (void)
MONITOR_TEST_FLAG_NO_STORED);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -2965,17 +2964,17 @@ meta_test_monitor_lid_scaled_closed_opened (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("lid-scale.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), TRUE);
meta_monitor_manager_lid_is_closed_changed (monitor_manager);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
meta_backend_test_set_is_lid_closed (META_BACKEND_TEST (backend), FALSE);
meta_monitor_manager_lid_is_closed_changed (monitor_manager);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3006,7 +3005,7 @@ meta_test_monitor_no_outputs (void)
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
if (!test_client_do (x11_monitor_test_client, &error,
"resize", X11_TEST_CLIENT_WINDOW,
@@ -3027,7 +3026,7 @@ meta_test_monitor_no_outputs (void)
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3117,7 +3116,7 @@ meta_test_monitor_underscanning_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3212,7 +3211,7 @@ meta_test_monitor_preferred_non_first_mode (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3245,7 +3244,7 @@ meta_test_monitor_non_upright_panel (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NO_STORED);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3385,7 +3384,7 @@ meta_test_monitor_custom_vertical_config (void)
set_custom_monitor_config ("vertical.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3525,7 +3524,7 @@ meta_test_monitor_custom_primary_config (void)
set_custom_monitor_config ("primary.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3617,7 +3616,7 @@ meta_test_monitor_custom_underscanning_config (void)
set_custom_monitor_config ("underscanning.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3714,7 +3713,7 @@ meta_test_monitor_custom_scale_config (void)
set_custom_monitor_config ("scale.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3811,7 +3810,7 @@ meta_test_monitor_custom_fractional_scale_config (void)
set_custom_monitor_config ("fractional-scale.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -3908,7 +3907,7 @@ meta_test_monitor_custom_high_precision_fractional_scale_config (void)
set_custom_monitor_config ("high-precision-fractional-scale.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4045,7 +4044,7 @@ meta_test_monitor_custom_tiled_config (void)
set_custom_monitor_config ("tiled.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4202,7 +4201,7 @@ meta_test_monitor_custom_tiled_custom_resolution_config (void)
set_custom_monitor_config ("tiled-custom-resolution.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4376,7 +4375,7 @@ meta_test_monitor_custom_tiled_non_preferred_config (void)
set_custom_monitor_config ("non-preferred-tiled-custom-resolution.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4504,7 +4503,7 @@ meta_test_monitor_custom_mirrored_config (void)
set_custom_monitor_config ("mirrored.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4639,7 +4638,7 @@ meta_test_monitor_custom_first_rotated_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("first-rotated.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4775,7 +4774,7 @@ meta_test_monitor_custom_second_rotated_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("second-rotated.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -4967,7 +4966,7 @@ meta_test_monitor_custom_second_rotated_tiled_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("second-rotated-tiled.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5159,7 +5158,7 @@ meta_test_monitor_custom_second_rotated_nonnative_tiled_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("second-rotated-tiled.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5309,7 +5308,7 @@ meta_test_monitor_custom_second_rotated_nonnative_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("second-rotated.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5419,7 +5418,7 @@ meta_test_monitor_custom_interlaced_config (void)
set_custom_monitor_config ("interlaced.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5548,7 +5547,7 @@ meta_test_monitor_custom_oneoff (void)
set_custom_monitor_config ("oneoff.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5684,7 +5683,7 @@ meta_test_monitor_custom_lid_switch_config (void)
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("lid-switch.xml");
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* External monitor connected */
@@ -5705,7 +5704,7 @@ meta_test_monitor_custom_lid_switch_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NONE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* Lid was closed */
@@ -5724,7 +5723,7 @@ meta_test_monitor_custom_lid_switch_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NONE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
/* Lid was opened */
@@ -5746,7 +5745,7 @@ meta_test_monitor_custom_lid_switch_config (void)
test_setup = create_monitor_test_setup (&test_case.setup,
MONITOR_TEST_FLAG_NONE);
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
}
static void
@@ -5871,7 +5870,7 @@ meta_test_monitor_migrated_rotated (void)
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
expected_path = g_test_get_filename (G_TEST_DIST,
"tests", "migration",
@@ -6015,7 +6014,7 @@ meta_test_monitor_migrated_wiggle_discard (void)
emulate_hotplug (test_setup);
g_test_assert_expected_messages ();
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
expected_path = g_test_get_filename (G_TEST_DIST,
"tests", "migration",
@@ -6278,7 +6277,7 @@ meta_test_monitor_migrated_wiggle (void)
emulate_hotplug (test_setup);
- check_monitor_configuration (&test_case);
+ check_monitor_configuration (&test_case.expect);
expected_path = g_test_get_filename (G_TEST_DIST,
"tests", "migration",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]