| 177 | } |
| 178 | |
| 179 | void TestVariantData::testCompareForEquality() { |
| 180 | QStringList firstRow, secondRow; |
| 181 | firstRow << "one" << "two" << "three"; |
| 182 | secondRow << "four" << "five"; |
| 183 | |
| 184 | QtCSV::VariantData firstData; |
| 185 | firstData.addRow(firstRow); |
| 186 | firstData.addRow(secondRow); |
| 187 | |
| 188 | QtCSV::VariantData secondData; |
| 189 | secondData.addRow(firstRow); |
| 190 | secondData.addRow(secondRow); |
| 191 | |
| 192 | QVERIFY2(firstData == firstData, |
| 193 | "Failed to compare for equality same object"); |
| 194 | QVERIFY2(!(firstData != firstData), |
| 195 | "Failed to compare for equality same object"); |
| 196 | |
| 197 | QVERIFY2(firstData == secondData, "Objects are not the same"); |
| 198 | QVERIFY2(!(firstData != secondData), "Objects are not the same"); |
| 199 | |
| 200 | secondData.addRow(firstRow); |
| 201 | |
| 202 | QVERIFY2(!(firstData == secondData), "Objects are the same"); |
| 203 | QVERIFY2(firstData != secondData, "Objects are the same"); |
| 204 | } |
| 205 | |
| 206 | void TestVariantData::testCopyConstruction() { |
| 207 | QStringList firstRow, secondRow; |