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

Method testCopyConstructor

kdevplatform/vcs/tests/test_vcsdiff.cpp:161–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160
161 void TestVcsDiff::testCopyConstructor()
162 {
163 // test plain copy
164 const QString diffString("diff");
165 const QUrl baseDiff("git://1");
166 const uint depth = 1;
167 const VcsLocation location("server");
168
169 {
170 VcsDiff diffA;
171 setDiff(diffA,
172 diffString, baseDiff, depth);
173
174 VcsDiff diffB(diffA);
175 compareDiff(diffA,
176 diffString, baseDiff, depth);
177 compareDiff(diffB,
178 diffString, baseDiff, depth);
179 }
180
181 const QString diffStringNew("diffNew");
182
183 // test detach after changing A
184 {
185 VcsDiff diffA;
186 setDiff(diffA,
187 diffString, baseDiff, depth);
188
189 VcsDiff diffB(diffA);
190 // change a property of A
191 diffA.setDiff(diffStringNew);
192
193 compareDiff(diffA,
194 diffStringNew, baseDiff, depth);
195 compareDiff(diffB,
196 diffString, baseDiff, depth);
197 }
198}
199
200void TestVcsDiff::testAssignOperator()
201{

Callers

nothing calls this directly

Calls 1

setDiffMethod · 0.45

Tested by

no test coverage detected