| 295 | } |
| 296 | |
| 297 | void TestVariantData::testRemoveRow() |
| 298 | { |
| 299 | QtCSV::VariantData data; |
| 300 | data.removeRow(0); |
| 301 | data.removeRow(563); |
| 302 | |
| 303 | QVERIFY2(true == data.isEmpty(), "Container is not empty"); |
| 304 | |
| 305 | QStringList valuesFirst, valuesSecond; |
| 306 | valuesFirst << "one" << "two" << "three"; |
| 307 | valuesSecond << "asgreg" << "ertetw" << ""; |
| 308 | |
| 309 | QString stringOne("hey test"), stringTwo("sdfwioiouoioi"); |
| 310 | |
| 311 | data << valuesFirst << valuesSecond << stringOne << stringTwo; |
| 312 | |
| 313 | data.removeRow(2); |
| 314 | |
| 315 | QVERIFY2(3 == data.rowCount(), "Wrong number of rows"); |
| 316 | QVERIFY2(valuesFirst == data.rowValues(0), "Wrong data for first row"); |
| 317 | QVERIFY2(valuesSecond == data.rowValues(1), "Wrong data for second row"); |
| 318 | QVERIFY2((QStringList() << stringTwo) == data.rowValues(2), |
| 319 | "Wrong data for third row"); |
| 320 | } |
| 321 | |
| 322 | void TestVariantData::testReplaceRow() |
| 323 | { |
nothing calls this directly
no test coverage detected