| 241 | } |
| 242 | |
| 243 | void TestStringData::testRemoveRow() |
| 244 | { |
| 245 | QtCSV::StringData strData; |
| 246 | strData.removeRow(0); |
| 247 | strData.removeRow(563); |
| 248 | |
| 249 | QVERIFY2(true == strData.isEmpty(), "Container is not empty"); |
| 250 | |
| 251 | QStringList valuesFirst, valuesSecond; |
| 252 | valuesFirst << "one" << "two" << "three"; |
| 253 | valuesSecond << "asgreg" << "ertetw" << ""; |
| 254 | |
| 255 | QString stringOne("hey test"), stringTwo("sdfwioiouoioi"); |
| 256 | |
| 257 | strData << valuesFirst << valuesSecond << stringOne << stringTwo; |
| 258 | |
| 259 | strData.removeRow(2); |
| 260 | |
| 261 | QVERIFY2(3 == strData.rowCount(), "Wrong number of rows"); |
| 262 | QVERIFY2(valuesFirst == strData.rowValues(0), "Wrong data for first row"); |
| 263 | QVERIFY2(valuesSecond == strData.rowValues(1), "Wrong data for second row"); |
| 264 | QVERIFY2((QStringList() << stringTwo) == strData.rowValues(2), |
| 265 | "Wrong data for third row"); |
| 266 | } |
| 267 | |
| 268 | void TestStringData::testReplaceRow() |
| 269 | { |
nothing calls this directly
no test coverage detected