| 245 | } |
| 246 | |
| 247 | void TestStringData::testReplaceRow() { |
| 248 | QList<QString> valuesFirst, valuesSecond; |
| 249 | valuesFirst << "one" << "two" << "three"; |
| 250 | valuesSecond << "asgreg" << "ertetw" << ""; |
| 251 | |
| 252 | QString stringOne("hey test"), stringTwo("sdfwioiouoioi"); |
| 253 | |
| 254 | QtCSV::StringData strData; |
| 255 | strData << valuesFirst << valuesSecond << stringOne; |
| 256 | |
| 257 | strData.replaceRow(0, stringTwo); |
| 258 | QVERIFY2((QList<QString>() << stringTwo) == strData.rowValues(0), |
| 259 | "Wrong data for first row"); |
| 260 | |
| 261 | strData.replaceRow(2, QList<QString>()); |
| 262 | QVERIFY2(QList<QString>() == strData.rowValues(2), "Wrong data for third row"); |
| 263 | |
| 264 | strData.replaceRow(1, valuesFirst); |
| 265 | QVERIFY2(valuesFirst == strData.rowValues(1), "Wrong data for second row"); |
| 266 | } |
nothing calls this directly
no test coverage detected