| 192 | } |
| 193 | |
| 194 | void TestVariantData::testCompareForEquality() |
| 195 | { |
| 196 | QStringList firstRow, secondRow; |
| 197 | firstRow << "one" << "two" << "three"; |
| 198 | secondRow << "four" << "five"; |
| 199 | |
| 200 | QtCSV::VariantData firstData; |
| 201 | firstData.addRow(firstRow); |
| 202 | firstData.addRow(secondRow); |
| 203 | |
| 204 | QtCSV::VariantData secondData; |
| 205 | secondData.addRow(firstRow); |
| 206 | secondData.addRow(secondRow); |
| 207 | |
| 208 | QVERIFY2(firstData == firstData, |
| 209 | "Failed to compare for equality same object"); |
| 210 | QVERIFY2(false == (firstData != firstData), |
| 211 | "Failed to compare for equality same object"); |
| 212 | |
| 213 | QVERIFY2(firstData == secondData, "Objects are not the same"); |
| 214 | QVERIFY2(false == (firstData != secondData), "Objects are not the same"); |
| 215 | |
| 216 | secondData.addRow(firstRow); |
| 217 | |
| 218 | QVERIFY2(false == (firstData == secondData), "Objects are the same"); |
| 219 | QVERIFY2(firstData != secondData, "Objects are the same"); |
| 220 | } |
| 221 | |
| 222 | void TestVariantData::testCopyConstruction() |
| 223 | { |