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

Method testRepositoryServerConstructor

kdevplatform/vcs/tests/test_vcslocation.cpp:83–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void TestVcsLocation::testRepositoryServerConstructor()
84{
85 // valid
86 {
87 const QString repositoryServer = QStringLiteral("server");
88 const QString repositoryModule = QStringLiteral("module");
89 const QString repositoryBranch = QStringLiteral("branch");
90 const QString repositoryTag = QStringLiteral("tag");
91 const QString repositoryPath = QStringLiteral("path");
92 const QVariant userData = QVariant(QStringLiteral("userdata"));
93
94 VcsLocation serverLocation(repositoryServer);
95 setServerLocation(serverLocation,
96 repositoryModule, repositoryBranch, repositoryTag, repositoryPath, userData);
97
98 compareServerLocation(serverLocation,
99 repositoryServer, repositoryModule, repositoryBranch, repositoryTag, repositoryPath,
100 userData);
101 }
102
103 // invalid
104 {
105 const QString repositoryServer;
106 VcsLocation serverLocation(repositoryServer);
107
108 QCOMPARE(serverLocation.isValid(), false);
109 QCOMPARE(serverLocation.type(), VcsLocation::RepositoryLocation);
110 QCOMPARE(serverLocation.repositoryServer(), repositoryServer);
111 }
112}
113
114void TestVcsLocation::testCopyConstructor()
115{

Callers

nothing calls this directly

Calls 4

repositoryServerMethod · 0.80
QVariantClass · 0.50
isValidMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected