File indexing completed on 2022-11-29 20:07:33

0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org>
0003 
0004 #include <QDebug>
0005 #include <QTest>
0006 
0007 #include <KSycoca>
0008 #include <device.h>
0009 
0010 class DeviceTest : public QObject
0011 {
0012     Q_OBJECT
0013 private Q_SLOTS:
0014     void testDBusName()
0015     {
0016         QString udi("udi-pass");
0017         Device dev("//superinvalid//udi/-/", "producti", "/dev/yo");
0018         QCOMPARE(dev.objectName(), "__superinvalid__udi___");
0019     }
0020 };
0021 
0022 QTEST_MAIN(DeviceTest)
0023 
0024 #include "devicetest.moc"