| 204 | } |
| 205 | |
| 206 | void TestVariantData::testCopyConstruction() { |
| 207 | QStringList firstRow, secondRow; |
| 208 | firstRow << "one" << "two" << "three"; |
| 209 | secondRow << "four" << "five"; |
| 210 | |
| 211 | QtCSV::VariantData firstData; |
| 212 | firstData.addRow(firstRow); |
| 213 | firstData.addRow(secondRow); |
| 214 | |
| 215 | { |
| 216 | QtCSV::VariantData secondData(firstData); |
| 217 | |
| 218 | QVERIFY2(firstData.rowCount() == secondData.rowCount(), |
| 219 | "Wrong number of rows"); |
| 220 | QVERIFY2(firstRow == secondData.rowValues(0), |
| 221 | "Wrong data for first row"); |
| 222 | QVERIFY2(secondRow == secondData.rowValues(1), |
| 223 | "Wrong data for second row"); |
| 224 | } |
| 225 | |
| 226 | QVERIFY2(2 == firstData.rowCount(), "Wrong number of rows"); |
| 227 | QVERIFY2(firstRow == firstData.rowValues(0), "Wrong data for first row"); |
| 228 | QVERIFY2(secondRow == firstData.rowValues(1), "Wrong data for second row"); |
| 229 | } |
| 230 | |
| 231 | void TestVariantData::testCopyAssignment() { |
| 232 | QStringList firstRow, secondRow; |