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

Method testLocalUrlConstructor

kdevplatform/vcs/tests/test_vcslocation.cpp:58–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void TestVcsLocation::testLocalUrlConstructor()
59{
60 // valid
61 {
62 const QUrl localUrl = QUrl("file:///tmp/foo");
63
64 const VcsLocation localLocation(localUrl);
65
66 QCOMPARE(localLocation.isValid(), true);
67 QCOMPARE(localLocation.type(), VcsLocation::LocalLocation);
68 QCOMPARE(localLocation.localUrl(), localUrl);
69 }
70
71 // invalid
72 {
73 const QUrl localUrl;
74
75 const VcsLocation localLocation(localUrl);
76
77 QCOMPARE(localLocation.isValid(), false);
78 QCOMPARE(localLocation.type(), VcsLocation::LocalLocation);
79 QCOMPARE(localLocation.localUrl(), localUrl);
80 }
81}
82
83void TestVcsLocation::testRepositoryServerConstructor()
84{

Callers

nothing calls this directly

Calls 4

localUrlMethod · 0.80
QUrlClass · 0.50
isValidMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected