Changeset View
Changeset View
Standalone View
Standalone View
autotests/extractortest.cpp
Show All 13 Lines | 1 | /* | |||
---|---|---|---|---|---|
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/ExtractorEngine> | 18 | #include <KItinerary/ExtractorEngine> | ||
19 | #include <KItinerary/ExtractorPostprocessor> | 19 | #include <KItinerary/ExtractorPostprocessor> | ||
20 | #include <KItinerary/ExtractorPreprocessor> | 20 | #include <KItinerary/ExtractorPreprocessor> | ||
21 | #include <KItinerary/ExtractorRepository> | 21 | #include <KItinerary/ExtractorRepository> | ||
22 | #include <KItinerary/Init> | ||||
22 | #include <KItinerary/JsonLdDocument> | 23 | #include <KItinerary/JsonLdDocument> | ||
23 | #include <KItinerary/PdfDocument> | 24 | #include <KItinerary/PdfDocument> | ||
24 | #include <KItinerary/StructuredDataExtractor> | 25 | #include <KItinerary/StructuredDataExtractor> | ||
25 | 26 | | |||
26 | #include <KPkPass/Pass> | 27 | #include <KPkPass/Pass> | ||
27 | 28 | | |||
28 | #include <KMime/Message> | 29 | #include <KMime/Message> | ||
29 | 30 | | |||
Show All 22 Lines | 52 | private: | |||
52 | ExtractorEngine m_engine; | 53 | ExtractorEngine m_engine; | ||
53 | ExtractorRepository m_repo; | 54 | ExtractorRepository m_repo; | ||
54 | 55 | | |||
55 | private Q_SLOTS: | 56 | private Q_SLOTS: | ||
56 | void initTestCase() | 57 | void initTestCase() | ||
57 | { | 58 | { | ||
58 | // use some exotic locale to ensure the date/time parsing doesn't just work by luck | 59 | // use some exotic locale to ensure the date/time parsing doesn't just work by luck | ||
59 | QLocale::setDefault(QLocale(QStringLiteral("fr_FR"))); | 60 | QLocale::setDefault(QLocale(QStringLiteral("fr_FR"))); | ||
61 | | ||||
62 | KItinerary::init(); | ||||
60 | } | 63 | } | ||
61 | 64 | | |||
62 | void testExtract_data() | 65 | void testExtract_data() | ||
63 | { | 66 | { | ||
64 | QTest::addColumn<QString>("contextFile"); | 67 | QTest::addColumn<QString>("contextFile"); | ||
65 | QTest::addColumn<QString>("inputFile"); | 68 | QTest::addColumn<QString>("inputFile"); | ||
66 | 69 | | |||
67 | QDir baseDir(QStringLiteral(SOURCE_DIR "/../../kitinerary-tests")); | 70 | QDir baseDir(QStringLiteral(SOURCE_DIR "/../../kitinerary-tests")); | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |