| 218 | } |
| 219 | |
| 220 | void TestStringData::testOperatorInput() |
| 221 | { |
| 222 | QtCSV::StringData data; |
| 223 | data << QString("1") << "one"; |
| 224 | |
| 225 | QStringList thirdRow; |
| 226 | thirdRow << "one" << "two" << "three"; |
| 227 | |
| 228 | data << thirdRow; |
| 229 | |
| 230 | QVERIFY2(3 == data.rowCount(), "Wrong number of rows"); |
| 231 | |
| 232 | QStringList expectedFirstRow, expectedSecondRow; |
| 233 | expectedFirstRow << "1"; |
| 234 | expectedSecondRow << "one"; |
| 235 | |
| 236 | QVERIFY2(expectedFirstRow == data.rowValues(0), "Wrong data for first row"); |
| 237 | QVERIFY2(expectedSecondRow == data.rowValues(1), |
| 238 | "Wrong data for second row"); |
| 239 | |
| 240 | QVERIFY2(thirdRow == data.rowValues(2), "Wrong data for third row"); |
| 241 | } |
| 242 | |
| 243 | void TestStringData::testRemoveRow() |
| 244 | { |