File indexing completed on 2024-12-01 03:39:25
0001 // SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 #include "kruntimeplatform.h" 0005 #include <QObject> 0006 #include <QTest> 0007 0008 class KRuntimePlatformTest : public QObject 0009 { 0010 Q_OBJECT 0011 private Q_SLOTS: 0012 void testRuntimePlatform() 0013 { 0014 qputenv("PLASMA_PLATFORM", "mobile:bigscreen"); 0015 QStringList expected{QStringLiteral("mobile"), QStringLiteral("bigscreen")}; 0016 QCOMPARE(KRuntimePlatform::runtimePlatform(), expected); 0017 } 0018 }; 0019 0020 QTEST_GUILESS_MAIN(KRuntimePlatformTest) 0021 0022 #include "kruntimeplatformtest.moc"