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

Method testAssignOperator

kdevplatform/vcs/tests/test_vcsdiff.cpp:200–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void TestVcsDiff::testAssignOperator()
201{
202 // test plain copy
203 const QString diffString("diff");
204 const QUrl baseDiff("git://1");
205 const uint depth = 1;
206 const VcsLocation location("server");
207
208 {
209 VcsDiff diffA;
210 setDiff(diffA,
211 diffString, baseDiff, depth);
212
213 VcsDiff diffB;
214 diffB = diffA;
215 compareDiff(diffA,
216 diffString, baseDiff, depth);
217 compareDiff(diffB,
218 diffString, baseDiff, depth);
219 }
220
221 const QString diffStringNew("diffNew");
222
223 // test detach after changing A
224 {
225 VcsDiff diffA;
226 setDiff(diffA,
227 diffString, baseDiff, depth);
228
229 VcsDiff diffB;
230 diffB = diffA;
231 // change a property of A
232 diffA.setDiff(diffStringNew);
233
234 compareDiff(diffA,
235 diffStringNew, baseDiff, depth);
236 compareDiff(diffB,
237 diffString, baseDiff, depth);
238 }
239}
240
241QTEST_GUILESS_MAIN(TestVcsDiff)
242

Callers

nothing calls this directly

Calls 1

setDiffMethod · 0.45

Tested by

no test coverage detected