| 232 | { |
| 233 | public: |
| 234 | void add(uint i) |
| 235 | { |
| 236 | if (realSet.find(i) != realSet.end()) { |
| 237 | QVERIFY(set.contains(i)); |
| 238 | return; |
| 239 | } else { |
| 240 | QVERIFY(!set.contains(i)); |
| 241 | } |
| 242 | clock_t start = clock(); |
| 243 | realSet.insert(i); |
| 244 | std_insertion += clock() - start; |
| 245 | |
| 246 | start = clock(); |
| 247 | set.insert(i); |
| 248 | emb_insertion += clock() - start; |
| 249 | |
| 250 | start = clock(); |
| 251 | bool contained = realSet.find(i) != realSet.end(); |
| 252 | std_contains += clock() - start; |
| 253 | |
| 254 | start = clock(); |
| 255 | set.contains(i); |
| 256 | emb_contains += clock() - start; |
| 257 | |
| 258 | QVERIFY(set.contains(i)); |
| 259 | QVERIFY(contained); |
| 260 | set.verify(); |
| 261 | } |
| 262 | |
| 263 | void remove(uint i) |
| 264 | { |
no test coverage detected