gio-qt/test/tst_matchgioenum.cpp
2019-07-31 13:05:39 +08:00

51 lines
1.4 KiB
C++

#include <QString>
#include <QtTest>
#include <dgiofile.h>
#include <dgiofileinfo.h>
#include <dgiomountoperation.h>
#include <giomm.h>
class DGioMatchGioEnumTest : public QObject
{
Q_OBJECT
public:
DGioMatchGioEnumTest();
private Q_SLOTS:
void testCase_DGioFileClass();
void testCase_DGioFileInfoClass();
void testCase_DGioMountOperationClass();
};
DGioMatchGioEnumTest::DGioMatchGioEnumTest()
{
//
}
void DGioMatchGioEnumTest::testCase_DGioFileClass()
{
QCOMPARE(DGioFileQueryInfoFlag::FILE_QUERY_INFO_NONE, Gio::FILE_QUERY_INFO_NONE);
QCOMPARE(DGioFileQueryInfoFlag::FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, Gio::FILE_QUERY_INFO_NOFOLLOW_SYMLINKS);
}
void DGioMatchGioEnumTest::testCase_DGioFileInfoClass()
{
QCOMPARE(DGioFileType::FILE_TYPE_NOT_KNOWN, Gio::FILE_TYPE_NOT_KNOWN);
QCOMPARE(DGioFileType::FILE_TYPE_SYMBOLIC_LINK, Gio::FILE_TYPE_SYMBOLIC_LINK);
QCOMPARE(DGioFileType::FILE_TYPE_MOUNTABLE, Gio::FILE_TYPE_MOUNTABLE);
}
void DGioMatchGioEnumTest::testCase_DGioMountOperationClass()
{
QCOMPARE(DGioAskPasswordFlag::ASK_PASSWORD_NEED_PASSWORD, Gio::ASK_PASSWORD_NEED_PASSWORD);
QCOMPARE(DGioAskPasswordFlag::ASK_PASSWORD_NEED_DOMAIN, Gio::ASK_PASSWORD_NEED_DOMAIN);
QCOMPARE(DGioAskPasswordFlag::ASK_PASSWORD_ANONYMOUS_SUPPORTED, Gio::ASK_PASSWORD_ANONYMOUS_SUPPORTED);
}
QTEST_APPLESS_MAIN(DGioMatchGioEnumTest)
#include "tst_matchgioenum.moc"