| 229 | } |
| 230 | |
| 231 | void TestVariantData::testCopyAssignment() { |
| 232 | QStringList firstRow, secondRow; |
| 233 | firstRow << "one" << "two" << "three"; |
| 234 | secondRow << "four" << "five"; |
| 235 | |
| 236 | QtCSV::VariantData firstData; |
| 237 | firstData.addRow(firstRow); |
| 238 | firstData.addRow(secondRow); |
| 239 | |
| 240 | { |
| 241 | QtCSV::VariantData secondData; |
| 242 | secondData = firstData; |
| 243 | |
| 244 | QVERIFY2(firstData.rowCount() == secondData.rowCount(), |
| 245 | "Wrong number of rows"); |
| 246 | QVERIFY2(firstRow == secondData.rowValues(0), |
| 247 | "Wrong data for first row"); |
| 248 | QVERIFY2(secondRow == secondData.rowValues(1), |
| 249 | "Wrong data for second row"); |
| 250 | } |
| 251 | |
| 252 | QVERIFY2(2 == firstData.rowCount(), "Wrong number of rows"); |
| 253 | QVERIFY2(firstRow == firstData.rowValues(0), "Wrong data for first row"); |
| 254 | QVERIFY2(secondRow == firstData.rowValues(1), "Wrong data for second row"); |
| 255 | } |
| 256 | |
| 257 | void TestVariantData::testOperatorInput() { |
| 258 | QtCSV::VariantData data; |