MCPcopy Create free account
hub / github.com/KDE/kdevelop / testHasParent_data

Method testHasParent_data

kdevplatform/util/tests/test_path.cpp:665–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665void TestPath::testHasParent_data()
666{
667 QTest::addColumn<QString>("input");
668 QTest::addColumn<bool>("hasParent");
669
670 QTest::newRow("empty") << QString() << false;
671#ifdef Q_OS_WIN
672 QTest::newRow("\\") << QStringLiteral("\\") << true; // true b/c parent could be e.g. 'C:'
673#else
674 QTest::newRow("/") << QStringLiteral("/") << false;
675 QTest::newRow("/foo") << QStringLiteral("/foo") << true;
676 QTest::newRow("/foo/bar") << QStringLiteral("/foo/bar") << true;
677 QTest::newRow("//foo/bar") << QStringLiteral("//foo/bar") << true;
678#endif
679 QTest::newRow("http://foo.bar") << QStringLiteral("http://foo.bar") << false;
680 QTest::newRow("http://foo.bar/") << QStringLiteral("http://foo.bar/") << false;
681 QTest::newRow("http://foo.bar/asdf") << QStringLiteral("http://foo.bar/asdf") << true;
682 QTest::newRow("http://foo.bar/asdf/asdf") << QStringLiteral("http://foo.bar/asdf/asdf") << true;
683}
684
685void TestPath::testHasParent()
686{

Callers

nothing calls this directly

Calls 1

QStringClass · 0.50

Tested by

no test coverage detected