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

Method testReadFileWithCommas

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

Source from the content-addressed store, hash-verified

51}
52
53void TestReader::testReadFileWithCommas()
54{
55 const QString path = getPathToFileTestComma();
56 QList<QStringList> data = QtCSV::Reader::readToList(path);
57
58 QVERIFY2(false == data.isEmpty(), "Failed to read file content");
59
60 QList<QStringList> expected;
61 expected << (QStringList() << "one" << "two" << "three");
62 expected << (QStringList() << "one_element");
63 expected << (QStringList() << "1" << "2" << "3");
64 expected << (QStringList());
65 expected << (QStringList() << "3.14");
66
67 QVERIFY2(expected.size() == data.size(), "Wrong number of rows");
68 for (int i = 0; i < data.size(); ++i)
69 {
70 QVERIFY2(expected.at(i) == data.at(i), "Wrong row data");
71 }
72}
73
74void TestReader::testReadFileWithDotsInName()
75{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected