[libcalamares] Expand testing of TZ location lookup

- Cape Town is in South Africa, so one might expect it to get South
  Africa's timezone -- which is Africa/Johannesburg -- but Windhoek
  is closer, so it gets that.
- Port Elisabeth is similar: Maseru lies between it an Johannesburg,
  so it gets the wrong timezone, too.

These both illustrate how the limited resolution of the map, together
with the "closest location" lookup, can give poor results. For most
of South Africa, the "wrong" timezone is closer than the right one.
This commit is contained in:
Adriaan de Groot 2020-08-08 23:40:13 +10:00
parent 6a33e72b58
commit 028d424c73

View File

@ -402,6 +402,11 @@ LocaleTests::testLocationLookup_data()
QTest::newRow( "Tarawa E" ) << 0.0 << 179.0 << QString( "Tarawa" ); QTest::newRow( "Tarawa E" ) << 0.0 << 179.0 << QString( "Tarawa" );
QTest::newRow( "Tarawa W" ) << 0.0 << -179.0 << QString( "Tarawa" ); QTest::newRow( "Tarawa W" ) << 0.0 << -179.0 << QString( "Tarawa" );
QTest::newRow( "Johannesburg" ) << -26.0 << 28.0 << QString( "Johannesburg" ); // South Africa
QTest::newRow( "Maseru" ) << -29.0 << 27.0 << QString( "Maseru" ); // Lesotho
QTest::newRow( "Windhoek" ) << -22.0 << 17.0 << QString( "Windhoek" ); // Namibia
QTest::newRow( "Port Elisabeth" ) << -33.0 << 25.0 << QString( "Johannesburg" ); // South Africa
QTest::newRow( "Cape Town" ) << -33.0 << 18.0 << QString( "Johannesburg" ); // South Africa
} }
void void