MCPcopy Create free account
hub / github.com/KDE/kdiff3 / verify

Method verify

src/diff.cpp:710–724  ·  view source on GitHub ↗

Verify difflist

Source from the content-addressed store, hash-verified

708#ifndef NDEBUG
709// Verify difflist
710void DiffList::verify(const LineRef size1, const LineRef size2)
711{
712 LineRef l1 = 0;
713 LineRef l2 = 0;
714
715 for(const Diff& curDiff: *this)
716 {
717 assert(curDiff.numberOfEquals() >= 0);
718 assert(curDiff.diff1() <= limits<LineType>::max() && curDiff.diff2() <= limits<LineType>::max());
719 l1 += curDiff.numberOfEquals() + LineRef(curDiff.diff1());
720 l2 += curDiff.numberOfEquals() + LineRef(curDiff.diff2());
721 }
722
723 assert(l1 == size1 && l2 == size2);
724}
725#endif
726
727void ManualDiffHelpList::runDiff(const std::shared_ptr<LineDataVector>& p1, LineRef size1, const std::shared_ptr<LineDataVector>& p2, LineRef size2, DiffList& diffList,

Callers

nothing calls this directly

Calls 4

LineRefClass · 0.85
numberOfEqualsMethod · 0.80
diff1Method · 0.80
diff2Method · 0.80

Tested by

no test coverage detected