File: devicetest.cpp

package info (click to toggle)
plasma-disks 6.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,056 kB
  • sloc: cpp: 1,603; xml: 299; makefile: 5; sh: 2
file content (24 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
// SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org>

#include <QDebug>
#include <QTest>

#include <KSycoca>
#include <device.h>

class DeviceTest : public QObject
{
    Q_OBJECT
private Q_SLOTS:
    void testDBusName()
    {
        QString udi("udi-pass");
        Device dev("//superinvalid//udi/-/", "producti", "/dev/yo");
        QCOMPARE(dev.objectName(), "__superinvalid__udi___");
    }
};

QTEST_MAIN(DeviceTest)

#include "devicetest.moc"