Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
c53c7e92
Commit
c53c7e92
authored
Aug 05, 2021
by
Volker Krause
Browse files
Fix test failures in builds without ZXing
parent
e77c04e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
autotests/applicationcontrollertest.cpp
View file @
c53c7e92
...
...
@@ -15,6 +15,7 @@
#include <transfermanager.h>
#include <tripgroupmanager.h>
#include <KItinerary/ExtractorCapabilities>
#include <KItinerary/File>
#include <QUrl>
...
...
@@ -34,6 +35,11 @@ private:
return
f
.
readAll
();
}
bool
hasZxing
()
{
return
KItinerary
::
ExtractorCapabilities
::
capabilitiesString
().
contains
(
QLatin1String
(
"zxing"
),
Qt
::
CaseInsensitive
);
}
private
Q_SLOTS
:
void
initTestCase
()
{
...
...
@@ -75,6 +81,9 @@ private Q_SLOTS:
QCOMPARE
(
passSpy
.
size
(),
1
);
QCOMPARE
(
infoSpy
.
size
(),
3
);
appController
.
importData
(
readFile
(
QLatin1String
(
SOURCE_DIR
"/data/iata-bcbp-demo.pdf"
)));
if
(
!
hasZxing
())
{
QSKIP
(
"Built without ZXing"
);
}
QCOMPARE
(
resSpy
.
size
(),
4
);
QCOMPARE
(
passSpy
.
size
(),
1
);
QCOMPARE
(
infoSpy
.
size
(),
4
);
...
...
@@ -111,6 +120,9 @@ private Q_SLOTS:
QCOMPARE
(
passSpy
.
size
(),
1
);
QCOMPARE
(
infoSpy
.
size
(),
2
);
appController
.
importFromUrl
(
QUrl
::
fromLocalFile
(
QLatin1String
(
SOURCE_DIR
"/data/iata-bcbp-demo.pdf"
)));
if
(
!
hasZxing
())
{
QSKIP
(
"Built without ZXing"
);
}
QCOMPARE
(
resSpy
.
size
(),
3
);
QCOMPARE
(
passSpy
.
size
(),
1
);
QCOMPARE
(
infoSpy
.
size
(),
3
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment