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
KItinerary
Commits
bb350eac
Commit
bb350eac
authored
Jul 25, 2020
by
Volker Krause
Browse files
Test more assumptions on the FreeBSD Asia/Hong_Kong test failure
parent
04b47279
Pipeline
#28325
passed with stage
in 7 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/airportdbtest.cpp
View file @
bb350eac
...
...
@@ -26,6 +26,11 @@ char *toString(const IataCode &code)
using
QTest
::
toString
;
return
toString
(
code
.
toString
());
}
char
*
toString
(
const
CountryId
&
code
)
{
using
QTest
::
toString
;
return
toString
(
code
.
toString
());
}
}}
class
AirportDbTest
:
public
QObject
...
...
@@ -119,6 +124,14 @@ private Q_SLOTS:
QCOMPARE
(
tz
.
id
(),
QByteArray
(
"Europe/Luxembourg"
));
// HKG seems to cause trouble on FreeBSD
const
auto
coord
=
KnowledgeDb
::
coordinateForAirport
(
KnowledgeDb
::
IataCode
{
"HKG"
});
QVERIFY
(
coord
.
isValid
());
QVERIFY
(
LocationUtil
::
distance
(
coord
.
latitude
,
coord
.
longitude
,
22.31600
,
113.93688
)
<
500
);
QCOMPARE
(
KnowledgeDb
::
timezoneForCoordinate
(
coord
.
latitude
,
coord
.
longitude
),
KnowledgeDb
::
Tz
::
Asia_Hong_Kong
);
const
auto
country
=
KnowledgeDb
::
countryForAirport
(
KnowledgeDb
::
IataCode
{
"HKG"
});
QCOMPARE
(
country
,
KnowledgeDb
::
CountryId
{
"CN"
});
QCOMPARE
(
KnowledgeDb
::
timezoneForLocation
(
coord
.
latitude
,
coord
.
longitude
,
country
),
KnowledgeDb
::
Tz
::
Asia_Hong_Kong
);
QCOMPARE
(
KnowledgeDb
::
tzId
(
KnowledgeDb
::
Tz
::
Asia_Hong_Kong
),
"Asia/Hong_Kong"
);
tz
=
KnowledgeDb
::
timezoneForAirport
(
KnowledgeDb
::
IataCode
{
"HKG"
});
QCOMPARE
(
tz
,
QTimeZone
(
"Asia/Hong_Kong"
));
QCOMPARE
(
tz
.
id
(),
QByteArray
(
"Asia/Hong_Kong"
));
...
...
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