|
|
@ -50,6 +50,7 @@ private Q_SLOTS:
|
|
|
|
void testRegions();
|
|
|
|
void testRegions();
|
|
|
|
void testSimpleZones();
|
|
|
|
void testSimpleZones();
|
|
|
|
void testComplexZones();
|
|
|
|
void testComplexZones();
|
|
|
|
|
|
|
|
void testTZLookup();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
LocaleTests::LocaleTests() {}
|
|
|
|
LocaleTests::LocaleTests() {}
|
|
|
@ -345,6 +346,21 @@ LocaleTests::testComplexZones()
|
|
|
|
QVERIFY( names.contains( "Abidjan" ) );
|
|
|
|
QVERIFY( names.contains( "Abidjan" ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
LocaleTests::testTZLookup()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
using namespace CalamaresUtils::Locale;
|
|
|
|
|
|
|
|
ZonesModel zones;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QVERIFY( zones.find( "America", "New_York" ) );
|
|
|
|
|
|
|
|
QCOMPARE( zones.find( "America", "New_York" )->zone(), QStringLiteral( "New_York" ) );
|
|
|
|
|
|
|
|
QCOMPARE( zones.find( "America", "New_York" )->tr(), QStringLiteral( "New York" ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QVERIFY( !zones.find( "Europe", "New_York" ) );
|
|
|
|
|
|
|
|
QVERIFY( !zones.find( "America", "New York" ) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTEST_GUILESS_MAIN( LocaleTests )
|
|
|
|
QTEST_GUILESS_MAIN( LocaleTests )
|
|
|
|
|
|
|
|
|
|
|
|
#include "utils/moc-warnings.h"
|
|
|
|
#include "utils/moc-warnings.h"
|
|
|
|