| 51 | } |
| 52 | |
| 53 | void 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 | |
| 74 | void TestReader::testReadFileWithDotsInName() |
| 75 | { |
nothing calls this directly
no test coverage detected