diff options
author | Florian Müllner <fmuellner@gnome.org> | 2021-07-19 00:01:24 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2021-07-19 00:03:33 +0200 |
commit | 952865a86ebb08f97263cfdbfe38b7adc20e4560 (patch) | |
tree | 1f9347628656210b03ceee4fae83beb21491d1eb /src/tests/monitor-transform-tests.c | |
parent | 7862f143937e43dca0513af3a24dabfb4d0db4fc (diff) | |
download | mutter-master.tar.gz |
Replace contents with redirect messagemaster
The default development branch is now `main`. This commit only exists
on `master` to point people towards that.
See https://gitlab.gnome.org/GNOME/glib/-/issues/2348 for details.
Diffstat (limited to 'src/tests/monitor-transform-tests.c')
-rw-r--r-- | src/tests/monitor-transform-tests.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/tests/monitor-transform-tests.c b/src/tests/monitor-transform-tests.c deleted file mode 100644 index 871a06b10..000000000 --- a/src/tests/monitor-transform-tests.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2020 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#include "config.h" - -#include "tests/monitor-transform-tests.h" - -#include "backends/meta-monitor-transform.h" - -static void -test_transform (void) -{ - const struct - { - MetaMonitorTransform transform; - MetaMonitorTransform other; - MetaMonitorTransform expect; - } tests[] = { - { - .transform = META_MONITOR_TRANSFORM_NORMAL, - .other = META_MONITOR_TRANSFORM_90, - .expect = META_MONITOR_TRANSFORM_90, - }, - { - .transform = META_MONITOR_TRANSFORM_NORMAL, - .other = META_MONITOR_TRANSFORM_FLIPPED_90, - .expect = META_MONITOR_TRANSFORM_FLIPPED_90, - }, - { - .transform = META_MONITOR_TRANSFORM_90, - .other = META_MONITOR_TRANSFORM_90, - .expect = META_MONITOR_TRANSFORM_180, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED_90, - .other = META_MONITOR_TRANSFORM_90, - .expect = META_MONITOR_TRANSFORM_FLIPPED_180, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED_90, - .other = META_MONITOR_TRANSFORM_180, - .expect = META_MONITOR_TRANSFORM_FLIPPED_270, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED_180, - .other = META_MONITOR_TRANSFORM_FLIPPED_180, - .expect = META_MONITOR_TRANSFORM_NORMAL, - }, - { - .transform = META_MONITOR_TRANSFORM_NORMAL, - .other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_90), - .expect = META_MONITOR_TRANSFORM_270, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED, - .other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_90), - .expect = META_MONITOR_TRANSFORM_FLIPPED_270, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED_180, - .other = meta_monitor_transform_invert (META_MONITOR_TRANSFORM_270), - .expect = META_MONITOR_TRANSFORM_FLIPPED_270, - }, - { - .transform = META_MONITOR_TRANSFORM_FLIPPED_180, - .other = - meta_monitor_transform_invert (META_MONITOR_TRANSFORM_FLIPPED_180), - .expect = META_MONITOR_TRANSFORM_NORMAL, - }, - }; - int i; - - for (i = 0; i < G_N_ELEMENTS (tests); i++) - { - MetaMonitorTransform result; - - result = meta_monitor_transform_transform (tests[i].transform, - tests[i].other); - g_assert_cmpint (result, ==, tests[i].expect); - } -} - -void -init_monitor_transform_tests (void) -{ - g_test_add_func ("/util/monitor-transform/transform", test_transform); -} |