Changeset View
Changeset View
Standalone View
Standalone View
autotests/addresstest.cpp
Show First 20 Lines • Show All 420 Lines • ▼ Show 20 Line(s) | 420 | QByteArray expected("BEGIN:VCARD\r\n" | |||
---|---|---|---|---|---|
421 | "VERSION:4.0\r\n" | 421 | "VERSION:4.0\r\n" | ||
422 | "ADR;LABEL=\"My Label\";TYPE=home:1234;My Extended Label;My Street;My Locality\r\n" | 422 | "ADR;LABEL=\"My Label\";TYPE=home:1234;My Extended Label;My Street;My Locality\r\n" | ||
423 | " ;My Region;My Postalcode;My country\r\nEMAIL:foo@kde.org\r\n" | 423 | " ;My Region;My Postalcode;My country\r\nEMAIL:foo@kde.org\r\n" | ||
424 | "N:;;;;\r\n" | 424 | "N:;;;;\r\n" | ||
425 | "UID:testuid\r\n" | 425 | "UID:testuid\r\n" | ||
426 | "END:VCARD\r\n\r\n"); | 426 | "END:VCARD\r\n\r\n"); | ||
427 | QCOMPARE(ba, expected); | 427 | QCOMPARE(ba, expected); | ||
428 | } | 428 | } | ||
429 | | ||||
430 | void AddressTest::countryToISOTest() | ||||
431 | { | ||||
432 | using namespace KContacts; | ||||
433 | QCOMPARE(Address::countryToISO(QStringLiteral("France")), QLatin1String("fr")); | ||||
434 | QCOMPARE(Address::countryToISO(QStringLiteral("Frankreich")), QLatin1String("fr")); | ||||
435 | QCOMPARE(Address::countryToISO(QStringLiteral("Germany")), QLatin1String("de")); | ||||
436 | QCOMPARE(Address::countryToISO(QStringLiteral("Österreich")), QLatin1String("at")); | ||||
437 | QCOMPARE(Address::countryToISO(QStringLiteral("Disneyland")), QString()); | ||||
438 | } |