| 273 | } |
| 274 | |
| 275 | void TestVariantData::testOperatorInput() |
| 276 | { |
| 277 | QtCSV::VariantData data; |
| 278 | data << QString("1") << QVariant(double(3.14)); |
| 279 | |
| 280 | QStringList thirdRow; |
| 281 | thirdRow << "one" << "two" << "three"; |
| 282 | |
| 283 | data << thirdRow; |
| 284 | |
| 285 | QVERIFY2(3 == data.rowCount(), "Wrong number of rows"); |
| 286 | |
| 287 | QStringList expectedFirstRow, expectedSecondRow; |
| 288 | expectedFirstRow << "1"; |
| 289 | expectedSecondRow << QVariant(double(3.14)).toString(); |
| 290 | |
| 291 | QVERIFY2(expectedFirstRow == data.rowValues(0), "Wrong data for first row"); |
| 292 | QVERIFY2(expectedSecondRow == data.rowValues(1), |
| 293 | "Wrong data for second row"); |
| 294 | QVERIFY2(thirdRow == data.rowValues(2), "Wrong data for third row"); |
| 295 | } |
| 296 | |
| 297 | void TestVariantData::testRemoveRow() |
| 298 | { |