| 255 | } |
| 256 | |
| 257 | void TestVariantData::testOperatorInput() { |
| 258 | QtCSV::VariantData data; |
| 259 | data << QString("1") << QVariant(double(3.14)); |
| 260 | |
| 261 | QStringList thirdRow; |
| 262 | thirdRow << "one" << "two" << "three"; |
| 263 | |
| 264 | data << thirdRow; |
| 265 | |
| 266 | QVERIFY2(3 == data.rowCount(), "Wrong number of rows"); |
| 267 | |
| 268 | QStringList expectedFirstRow, expectedSecondRow; |
| 269 | expectedFirstRow << "1"; |
| 270 | expectedSecondRow << QVariant(double(3.14)).toString(); |
| 271 | |
| 272 | QVERIFY2(expectedFirstRow == data.rowValues(0), "Wrong data for first row"); |
| 273 | QVERIFY2(expectedSecondRow == data.rowValues(1), |
| 274 | "Wrong data for second row"); |
| 275 | QVERIFY2(thirdRow == data.rowValues(2), "Wrong data for third row"); |
| 276 | } |
| 277 | |
| 278 | void TestVariantData::testRemoveRow() { |
| 279 | QtCSV::VariantData data; |