Changeset View
Changeset View
Standalone View
Standalone View
autotests/uic9183parsertest.cpp
Show All 9 Lines | 1 | /* | |||
---|---|---|---|---|---|
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | 11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | ||
12 | License for more details. | 12 | License for more details. | ||
13 | 13 | | |||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include <KItinerary/Init> | ||||
18 | #include <KItinerary/JsonLdDocument> | 19 | #include <KItinerary/JsonLdDocument> | ||
19 | #include <KItinerary/Uic9183Parser> | 20 | #include <KItinerary/Uic9183Parser> | ||
20 | 21 | | |||
21 | #include <QDebug> | 22 | #include <QDebug> | ||
22 | #include <QFile> | 23 | #include <QFile> | ||
23 | #include <QJsonArray> | 24 | #include <QJsonArray> | ||
24 | #include <QJsonDocument> | 25 | #include <QJsonDocument> | ||
25 | #include <QObject> | 26 | #include <QObject> | ||
26 | #include <QTest> | 27 | #include <QTest> | ||
27 | 28 | | |||
28 | using namespace KItinerary; | 29 | using namespace KItinerary; | ||
29 | 30 | | |||
30 | class Uic9183ParserTest : public QObject | 31 | class Uic9183ParserTest : public QObject | ||
31 | { | 32 | { | ||
32 | Q_OBJECT | 33 | Q_OBJECT | ||
33 | private Q_SLOTS: | 34 | private Q_SLOTS: | ||
35 | void initTestCase() | ||||
36 | { | ||||
37 | KItinerary::init(); | ||||
38 | } | ||||
39 | | ||||
34 | void testParserValid_data() | 40 | void testParserValid_data() | ||
35 | { | 41 | { | ||
36 | QTest::addColumn<QString>("inFile"); | 42 | QTest::addColumn<QString>("inFile"); | ||
37 | QTest::addColumn<QString>("refFile"); | 43 | QTest::addColumn<QString>("refFile"); | ||
38 | 44 | | |||
39 | QDir dir(QStringLiteral(SOURCE_DIR "/uic918-3/valid")); | 45 | QDir dir(QStringLiteral(SOURCE_DIR "/uic918-3/valid")); | ||
40 | const auto lst = dir.entryList(QStringList(QStringLiteral("*.bin")), QDir::Files | QDir::Readable | QDir::NoSymLinks); | 46 | const auto lst = dir.entryList(QStringList(QStringLiteral("*.bin")), QDir::Files | QDir::Readable | QDir::NoSymLinks); | ||
41 | for (const auto &file : lst) { | 47 | for (const auto &file : lst) { | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |