Changeset View
Changeset View
Standalone View
Standalone View
autotests/writercollectiontest.cpp
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * This file is part of the KDE KFileMetaData project | ||||
3 | * Copyright (C) 2014 Vishesh Handa <me@vhanda.in> | ||||
4 | * 2017 Igor Poboiko <igor.poboiko@gmail.com> | ||||
5 | * 2019 Alexander Stippich <a.stippich@gmx.net> | ||||
6 | * | ||||
7 | * This library is free software; you can redistribute it and/or | ||||
8 | * modify it under the terms of the GNU Lesser General Public | ||||
9 | * License as published by the Free Software Foundation; either | ||||
10 | * version 2.1 of the License, or (at your option) any later version. | ||||
11 | * | ||||
12 | * This library is distributed in the hope that it will be useful, | ||||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
15 | * Lesser General Public License for more details. | ||||
16 | * | ||||
17 | * You should have received a copy of the GNU Lesser General Public | ||||
18 | * License along with this library; if not, write to the Free Software | ||||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
20 | * | ||||
21 | */ | ||||
22 | | ||||
23 | #include <QObject> | ||||
24 | #include <QtTest> | ||||
25 | #include <QDebug> | ||||
26 | | ||||
27 | #include "writercollection.h" | ||||
28 | | ||||
29 | namespace KFileMetaData { | ||||
30 | | ||||
31 | class WriterCollectionTest : public QObject | ||||
32 | { | ||||
33 | Q_OBJECT | ||||
34 | private Q_SLOTS: | ||||
35 | void testFetchWriters() | ||||
36 | { | ||||
37 | QCoreApplication::setLibraryPaths({QCoreApplication::applicationDirPath()}); | ||||
38 | WriterCollection collection; | ||||
39 | QVERIFY(collection.fetchWriters(QStringLiteral("unknown/mimetype")).isEmpty()); | ||||
40 | QVERIFY(!collection.fetchWriters(QStringLiteral("audio/mpeg3")).isEmpty()); | ||||
41 | } | ||||
42 | | ||||
43 | }; | ||||
44 | | ||||
45 | } | ||||
46 | | ||||
47 | QTEST_GUILESS_MAIN(KFileMetaData::WriterCollectionTest) | ||||
48 | | ||||
49 | #include "writercollectiontest.moc" |