Debian Codegraph @

tests/common/platform/PlatformCheckerTests.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2021 Damir Porobic <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef KSNIP_PLATFORMCHECKERTESTS_H
21 #define KSNIP_PLATFORMCHECKERTESTS_H
22
23 #include <QtTest>
24
25 class PlatformCheckerTests : public QObject
26 {
27 Q_OBJECT
28 private slots:
29 void isX11_Should_ReturnTrue_When_X11InEnvVar();
30 void isX11_Should_ReturnFalse_When_X11NotInEnvVar();
31 void isWayland_Should_ReturnTrue_When_WaylandInEnvVar();
32 void isWayland_Should_ReturnFalse_When_WaylandNotInEnvVar();
33 void isKde_Should_ReturnTrue_When_KdeInEnvVar();
34 void isKde_Should_ReturnFalse_When_KdeNotInEnvVar();
35 void isGnome_Should_ReturnTrue_When_GnomeInEnvVar();
36 void isGnome_Should_ReturnTrue_When_UnityInEnvVar();
37 void isGnome_Should_ReturnFalse_When_GnomeOrUnityNotInEnvVar();
38 void isSnap_Should_ReturnTrue_When_SnapEnvVarSet();
39 void isSnap_Should_ReturnFalse_When_SnapEnvVarNotSet();
40 void gnomeVersion_Should_ReturnGnomeVersion_When_GnomeAndVersionFileExists();
41 void gnomeVersion_Should_ReturnMinusOne_When_NotGnomeButVersionFileExists();
42 void gnomeVersion_Should_ReturnMinusOne_When_GnomeButVersionFileDoesNotExists();
43 void isX11_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
44 void isWayland_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
45 void isKde_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
46 void isGnome_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
47 void isSnap_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
48 void gnomeVersion_Should_CallCommandRunnerOnlyOnce_When_CalledMultipleTimes();
49 };
50
51 #endif //KSNIP_PLATFORMCHECKERTESTS_H