mirror of
https://github.com/linuxdeepin/gio-qt.git
synced 2024-11-10 12:03:46 +01:00
fix: move test code to test project (#14)
This commit is contained in:
parent
4123262258
commit
7dc310c8a8
@ -94,16 +94,6 @@ int main(int argc, char * argv[])
|
||||
delete f;
|
||||
}
|
||||
|
||||
f = DGioFile::createFromPath("/home/mike/Desktop/1.png");
|
||||
if (f) {
|
||||
qDebug() << f->basename() << f->path() << f->uri();
|
||||
QExplicitlySharedDataPointer<DGioFileInfo> fi = f->createFileInfo();
|
||||
if (fi) {
|
||||
qDebug() << fi->fileType() << fi->displayName() << fi->fileSize();
|
||||
}
|
||||
delete f;
|
||||
}
|
||||
|
||||
qDebug() << "----------------------";
|
||||
|
||||
DGioMount * m = DGioMount::createFromPath("/media/wzc/_dde_data");
|
||||
|
@ -27,9 +27,10 @@ void DGioSimpleFileInfoTest::testCase_RegularFile()
|
||||
QFileInfo tmpFileInfo(tmpFile);
|
||||
|
||||
QScopedPointer<DGioFile> file(DGioFile::createFromPath(tmpFileInfo.absoluteFilePath()));
|
||||
|
||||
QExplicitlySharedDataPointer<DGioFileInfo> fi = file->createFileInfo();
|
||||
QCOMPARE(file->basename(), tmpFileInfo.fileName());
|
||||
QCOMPARE(file->path(), tmpFileInfo.absoluteFilePath());
|
||||
QCOMPARE(fi->fileSize(), tmpFileInfo.size());
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(DGioSimpleFileInfoTest)
|
||||
|
Loading…
Reference in New Issue
Block a user