Changeset View
Changeset View
Standalone View
Standalone View
autotests/unstructureddataextractortest.cpp
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | along with this library; see the file COPYING.LIB. If not, write to the | 15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | 17 | 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include <KItinerary/Extractor> | 20 | #include <KItinerary/Extractor> | ||
21 | #include <KItinerary/ExtractorEngine> | 21 | #include <KItinerary/ExtractorEngine> | ||
22 | #include <KItinerary/ExtractorPreprocessor> | 22 | #include <KItinerary/ExtractorPreprocessor> | ||
23 | #include <KItinerary/Init> | ||||
23 | #include <KItinerary/JsonLdDocument> | 24 | #include <KItinerary/JsonLdDocument> | ||
24 | #include <KItinerary/Organization> | 25 | #include <KItinerary/Organization> | ||
25 | 26 | | |||
26 | #include <QDebug> | 27 | #include <QDebug> | ||
27 | #include <QDir> | 28 | #include <QDir> | ||
28 | #include <QFile> | 29 | #include <QFile> | ||
29 | #include <QJsonArray> | 30 | #include <QJsonArray> | ||
30 | #include <QJsonDocument> | 31 | #include <QJsonDocument> | ||
Show All 26 Lines | 43 | { | |||
57 | return false; | 58 | return false; | ||
58 | } | 59 | } | ||
59 | 60 | | |||
60 | private Q_SLOTS: | 61 | private Q_SLOTS: | ||
61 | void initTestCase() | 62 | void initTestCase() | ||
62 | { | 63 | { | ||
63 | // use some exotic locale to ensure the date/time parsing doesn't just work by luck | 64 | // use some exotic locale to ensure the date/time parsing doesn't just work by luck | ||
64 | QLocale::setDefault(QLocale(QStringLiteral("fr_FR"))); | 65 | QLocale::setDefault(QLocale(QStringLiteral("fr_FR"))); | ||
66 | | ||||
67 | KItinerary::init(); | ||||
65 | } | 68 | } | ||
66 | 69 | | |||
67 | void testExtractText_data() | 70 | void testExtractText_data() | ||
68 | { | 71 | { | ||
69 | QTest::addColumn<QString>("inputFile"); | 72 | QTest::addColumn<QString>("inputFile"); | ||
70 | QTest::addColumn<QString>("extractorName"); | 73 | QTest::addColumn<QString>("extractorName"); | ||
71 | QTest::addColumn<QString>("jsonFile"); | 74 | QTest::addColumn<QString>("jsonFile"); | ||
72 | 75 | | |||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |