summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocale
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2011-02-22 14:41:59 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2011-02-24 11:42:45 (GMT)
commit3def7f4dd09f5d93f90d20eaedd17d8bd8c4a6fd (patch)
treefd47efebc5b57ba135253fdb06eaf2e3d3024468 /tests/auto/qlocale
parentc9071e8f9a26dee3a166579df69da11e0f6323fa (diff)
downloadQt-3def7f4dd09f5d93f90d20eaedd17d8bd8c4a6fd.zip
Qt-3def7f4dd09f5d93f90d20eaedd17d8bd8c4a6fd.tar.gz
Qt-3def7f4dd09f5d93f90d20eaedd17d8bd8c4a6fd.tar.bz2
Implemented QLocale::weekendStart and QLocale::weekendEnd
Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17088
Diffstat (limited to 'tests/auto/qlocale')
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 878a31e..913dbba 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -143,6 +143,7 @@ private slots:
void currency();
void quoteString();
void uiLanguages();
+ void weekendDays();
private:
QString m_decimal, m_thousand, m_sdate, m_ldate, m_time;
@@ -1124,6 +1125,9 @@ void tst_QLocale::macDefaultLocale()
QCOMPARE(locale.dayName(7), QString("Sunday"));
QCOMPARE(locale.monthName(1), QString("January"));
QCOMPARE(locale.monthName(12), QString("December"));
+ QCOMPARE(locale.firstDayOfWeek(), Qt::Sunday);
+ QCOMPARE(locale.weekendStart(), Qt::Saturday);
+ QCOMPARE(locale.weekendEnd(), Qt::Sunday);
QCOMPARE(locale.quoteString("string"), QString::fromUtf8("\xe2\x80\x9c" "string" "\xe2\x80\x9d"));
QCOMPARE(locale.quoteString("string", QLocale::AlternateQuotation), QString::fromUtf8("\xe2\x80\x98" "string" "\xe2\x80\x99"));
@@ -2185,5 +2189,12 @@ void tst_QLocale::uiLanguages()
QCOMPARE(ru_RU.uiLanguages().at(0), QLatin1String("ru_RU"));
}
+void tst_QLocale::weekendDays()
+{
+ const QLocale c(QLocale::C);
+ QCOMPARE(c.weekendStart(), Qt::Saturday);
+ QCOMPARE(c.weekendEnd(), Qt::Sunday);
+}
+
QTEST_APPLESS_MAIN(tst_QLocale)
#include "tst_qlocale.moc"