void KTempDirTest::testAutoDelete() { KTempDir *dir = new KTempDir("test"); QVERIFY(dir->status() == 0); QVERIFY(dir->exists()); QString dName = dir->name(); delete dir; QVERIFY(!QDir(dName).exists()); }
void KTempDirTest::testCreateSubDir() { KTempDir *dir = new KTempDir("test"); QVERIFY(dir->status() == 0); QVERIFY(dir->exists()); QDir d ( dir->name() ); QVERIFY(d.exists()); QVERIFY(d.mkdir(QString("123"))); QVERIFY(d.mkdir(QString("456"))); QString dName = dir->name(); delete dir; d.refresh(); QVERIFY(!QDir(dName).exists()); QVERIFY(!d.exists(QString("123"))); QVERIFY(!d.exists(QString("456"))); }