[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/tests
From: Michael Jansen <kde () michael-jansen ! biz>
Date: 2009-02-25 1:46:09
Message-ID: 1235526369.442913.30610.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 931253 by mjansen:
Test that subgroups having only subgroups but no entries still show up
in groupList().
The test fails.
CCMAIL: faure@kde.org
CCMAIL: ossi@kde.org
M +13 -0 kconfigtest.cpp
--- trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp #931252:931253
@@ -162,6 +162,12 @@
KConfigGroup cg3(&cg, "SubGroup/3");
cg3.writeEntry( "sub3string", "somevalue" );
+ cg = KConfigGroup(&sc, "NoEntryGroup");
+ cg1 = KConfigGroup(&cg, "NEG Child1");
+ cg1.writeEntry( "rectEntry", RECTENTRY );
+ cg2 = KConfigGroup(&cg, "NEG Child2");
+ cg2.writeEntry( "rectEntry", RECTENTRY );
+
sc.sync();
KConfig sc1("kdebugrc", KConfig::SimpleConfig);
@@ -860,6 +866,13 @@
QCOMPARE(QStringList(cg.entryMap().keys()), PARENTGROUPKEYS);
QCOMPARE(QStringList(subcg3.entryMap().keys()), SUBGROUP3KEYS);
+ // Make sure groupList returns groups having no entries but subgroups
+ KConfigGroup neg(&sc, "NoEntryGroup");
+ // Check the child are there
+ QCOMPARE(neg.groupList(), QStringList() << "NEG Child1" << "NEG Child2");
+ // No check if the group itself is there.
+ QVERIFY(sc.groupList().contains("NoEntryGroup"));
+
// make sure groupList() isn't returning something it shouldn't
foreach(const QString& group, sc.groupList()) {
QVERIFY(!group.isEmpty() && group != "<default>");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic