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

Function loadExpectedAlignmentFile

test/alignmenttest.cpp:176–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176void loadExpectedAlignmentFile(QString expectedResultFileName, Diff3LineList &expectedDiff3LineList)
177{
178 Diff3Line d3l;
179
180 expectedDiff3LineList.clear();
181
182 QFile file(expectedResultFileName);
183 QString line;
184 if ( file.open(QIODevice::ReadOnly) )
185 {
186 QTextStream t( &file );
187 while ( !t.atEnd() )
188 {
189 QStringList lst = t.readLine().split(QRegularExpression("\\s+"));
190 d3l.setLineA(lst.at(0).toInt());
191 d3l.setLineB(lst.at(1).toInt());
192 d3l.setLineC(lst.at(2).toInt());
193
194 expectedDiff3LineList.push_back( d3l );
195 }
196 file.close();
197 }
198}
199
200void writeActualAlignmentFile(QString actualResultFileName, const Diff3LineList &actualDiff3LineList)
201{

Callers 1

runTestFunction · 0.85

Calls 8

openMethod · 0.80
splitMethod · 0.80
setLineAMethod · 0.80
setLineBMethod · 0.80
setLineCMethod · 0.80
push_backMethod · 0.80
closeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected