X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ffb80cb00d8fd886051f970b5155a55b1d066fcd..e1b325a867ede95c5815ca11998017c67fc78ea9:/src/tests/draganddrophelpertest.cpp diff --git a/src/tests/draganddrophelpertest.cpp b/src/tests/draganddrophelpertest.cpp index a82e75c7b..f2c75fef0 100644 --- a/src/tests/draganddrophelpertest.cpp +++ b/src/tests/draganddrophelpertest.cpp @@ -29,35 +29,18 @@ void DragAndDropHelperTest::testUrlListMatchesUrl_data() QTest::addColumn("url"); QTest::addColumn("expected"); - QTest::newRow("test_equal") - << QList {QUrl::fromLocalFile("/root")} - << QUrl::fromLocalFile("/root") - << true; + QTest::newRow("test_equal") << QList{QUrl::fromLocalFile("/root")} << QUrl::fromLocalFile("/root") << true; - QTest::newRow("test_trailing_slash") - << QList {QUrl::fromLocalFile("/root/")} - << QUrl::fromLocalFile("/root") - << true; + QTest::newRow("test_trailing_slash") << QList{QUrl::fromLocalFile("/root/")} << QUrl::fromLocalFile("/root") << true; - QTest::newRow("test_ftp_scheme") - << QList {QUrl("ftp://server:2211/dir")} - << QUrl("ftp://server:2211/dir") - << true; + QTest::newRow("test_ftp_scheme") << QList{QUrl("ftp://server:2211/dir")} << QUrl("ftp://server:2211/dir") << true; - QTest::newRow("test_not_matched") - << QList {QUrl::fromLocalFile("/usr/share"), QUrl::fromLocalFile("/usr/local/bin")} - << QUrl::fromLocalFile("/usr/bin") - << false; + QTest::newRow("test_not_matched") << QList{QUrl::fromLocalFile("/usr/share"), QUrl::fromLocalFile("/usr/local/bin")} + << QUrl::fromLocalFile("/usr/bin") << false; - QTest::newRow("test_empty_target") - << QList {QUrl::fromLocalFile("/usr/share"), QUrl::fromLocalFile("/usr/local/bin")} - << QUrl() - << false; + QTest::newRow("test_empty_target") << QList{QUrl::fromLocalFile("/usr/share"), QUrl::fromLocalFile("/usr/local/bin")} << QUrl() << false; - QTest::newRow("test_empty_list") - << QList() - << QUrl::fromLocalFile("/usr/bin") - << false; + QTest::newRow("test_empty_list") << QList() << QUrl::fromLocalFile("/usr/bin") << false; } void DragAndDropHelperTest::testUrlListMatchesUrl() @@ -69,7 +52,6 @@ void DragAndDropHelperTest::testUrlListMatchesUrl() QCOMPARE(DragAndDropHelper::urlListMatchesUrl(urlList, url), expected); } - QTEST_MAIN(DragAndDropHelperTest) #include "draganddrophelpertest.moc"