[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 22:00:53
Message-ID: 1235599253.382366.2883.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 931879 by mjansen:
Fix the test for groupList() not returning the "<default>" group.
Test for it when we are sure there is such a group.
M +15 -2 kconfigtest.cpp
--- trunk/KDE/kdelibs/kdecore/tests/kconfigtest.cpp #931878:931879
@@ -162,11 +162,15 @@
KConfigGroup cg3(&cg, "SubGroup/3");
cg3.writeEntry( "sub3string", "somevalue" );
+ // Create A group containing only other groups. We want to make sure it
+ // shows up in groupList of sc
cg = KConfigGroup(&sc, "NoEntryGroup");
cg1 = KConfigGroup(&cg, "NEG Child1");
- cg1.writeEntry( "rectEntry", RECTENTRY );
+ cg1.writeEntry( "entry1", "somevalue" );
cg2 = KConfigGroup(&cg, "NEG Child2");
- cg2.writeEntry( "rectEntry", RECTENTRY );
+ cg2.writeEntry( "entry2", "somevalue" );
+ cg3 = KConfigGroup(&cg, "NEG Child3");
+ cg3 = KConfigGroup(&cg, "NEG Child3");
sc.sync();
@@ -672,6 +676,11 @@
QCOMPARE(lines.first(), QByteArray("TestKey=defaultGroup\n"));
#endif
+ // Now that the group exists make sure it isn't returned from groupList()
+ foreach(const QString& group, sc.groupList()) {
+ QVERIFY(!group.isEmpty() && group != "<default>");
+ }
+
defaultGroup.deleteGroup();
sc.sync();
@@ -716,6 +725,10 @@
QCOMPARE(lines.first(), QByteArray("TestKey=emptyGroup\n"));
#endif
+ // Now that the group exists make sure it isn't returned from groupList()
+ foreach(const QString& group, sc.groupList()) {
+ QVERIFY(!group.isEmpty() && group != "<default>");
+ }
emptyGroup.deleteGroup();
sc.sync();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic