MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / testReadFileWithEmptyFields

Method testReadFileWithEmptyFields

3rdparty/qtcsv-qt5/tests/testreader.cpp:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void TestReader::testReadFileWithEmptyFields()
386{
387 const QString path = getPathToFileWithEmptyFields();
388 QList<QStringList> data = QtCSV::Reader::readToList(path, ",", "\"");
389 QVERIFY2(false == data.isEmpty(), "Failed to read file content");
390
391 QList<QStringList> expected;
392 expected << (QStringList() << QString() << "0" << QString() << QString());
393
394 QVERIFY2(expected.size() == data.size(), "Wrong number of rows");
395 for (int i = 0; i < data.size(); ++i)
396 {
397 QVERIFY2(expected.at(i) == data.at(i), "Wrong row data");
398 }
399}
400
401void TestReader::testReadFileWithEmptyFieldsComplexSeparator()
402{

Callers

nothing calls this directly

Calls 5

QStringListClass · 0.50
QStringClass · 0.50
isEmptyMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected