[PATCH 02/23] kcalendartest: Clean up configuration before running a configuration-dependent test.
Jon Severinsson
jon at severinsson.net
Fri Oct 12 15:13:37 UTC 2012
These tests will otherwise fail if testEra() failed last time it ran...
---
kdecore/tests/kcalendartest.cpp | 8 ++++++++
1 fil ändrad, 8 tillägg(+)
diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp
index 9ca5ed4..397166a 100644
--- a/kdecore/tests/kcalendartest.cpp
+++ b/kdecore/tests/kcalendartest.cpp
@@ -202,6 +202,10 @@ void KCalendarTest::testTypes()
void KCalendarTest::testFormatDate()
{
+ KConfigGroup lcg(KSharedConfig::openConfig(), QString("Locale"));
+ KConfigGroup cg = lcg.group(QString("KCalendarSystem %1").arg("gregorian"));
+ cg.deleteGroup();
+
KLocale *locale = new KLocale(*KLocale::global());
locale->setDateFormatShort("%y-%m-%d");
const KCalendarSystem *calendar = KCalendarSystem::create(KLocale::QDateCalendar, locale);
@@ -1357,6 +1361,10 @@ void KCalendarTest::testIndianNational()
void KCalendarTest::testQDateCalendarBasic()
{
+ KConfigGroup lcg(KSharedConfig::openConfig(), QString("Locale"));
+ KConfigGroup cg = lcg.group(QString("KCalendarSystem %1").arg("gregorian"));
+ cg.deleteGroup();
+
const KCalendarSystem *calendar = KCalendarSystem::create(KLocale::QDateCalendar);
testCalendarSystemType(calendar, KLocale::QDateCalendar, "gregorian", "Gregorian");
--
1.7.10.4
More information about the Kde-frameworks-devel
mailing list