Add more tests.

This commit is contained in:
Felix Geyer 2010-08-14 14:26:25 +02:00
parent a3211872e0
commit 9b0ba46b31
4 changed files with 25 additions and 87 deletions

View file

@ -31,7 +31,6 @@ void TestGroup::testParenting()
{
Database* db = new Database();
Group* tmpRoot = new Group();
tmpRoot->setParent(db);
Group* g1 = new Group();
Group* g2 = new Group();
@ -52,6 +51,11 @@ void TestGroup::testParenting()
QVERIFY(g3->parent() == g1);
QVERIFY(g4->parent() == g3);
QVERIFY(g1->database() == db);
QVERIFY(g2->database() == db);
QVERIFY(g3->database() == db);
QVERIFY(g4->database() == db);
QVERIFY(tmpRoot->children().size() == 0);
QVERIFY(g1->children().size() == 2);
QVERIFY(g2->children().size() == 0);