19 using std::ostringstream;
62 QCOMPARE(ps.
count(), 0);
63 QCOMPARE(ps.
size(), 0u);
65 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
70 QCOMPARE(ps2.
count(), 3);
71 QCOMPARE(ps2.
size(), 3u);
85 coordT c2[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
93 QCOMPARE(ps8.
count(), 0);
94 QCOMPARE(ps8.
size(), 0u);
96 coordT c3[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
100 QCOMPARE(ps9.
count(), 3);
111 QCOMPARE(ps9.
count(), 3);
123 QCOMPARE(ps.
count(), 0);
124 QCOMPARE(ps.
size(), 0u);
126 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
131 QCOMPARE(ps2.
count(), 3);
132 QCOMPARE(ps2.
size(), 3u);
145 QVERIFY(!(ps5!=ps4));
146 coordT c2[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
154 QCOMPARE(ps8.
count(), 0);
155 QCOMPARE(ps8.
size(), 0u);
157 coordT c3[]= {10.0, 11.0, 12.0, 13.0, 14.0, 15.0};
161 QCOMPARE(ps9.
count(), 3);
166 QCOMPARE(ps9.
count(), 3);
175 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
178 QCOMPARE(ps.
size(), 2u);
186 QCOMPARE(vs.size(), 2u);
189 QList<QhullPoint> qs= ps.toQList();
190 QCOMPARE(qs.size(), 2);
192 QCOMPARE(p2[2], 5.0);
200 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
205 QCOMPARE(ps2.
count(), 2);
207 coordT c2[]= {-1.0, -2.0, -3.0, -4.0, -5.0, -6.0};
210 QCOMPARE(ps2.
count(), 2);
211 QCOMPARE(ps2.
size(), 2u);
222 QCOMPARE(ps2.
count(), 3);
223 QCOMPARE(ps2.
size(), 3u);
228 QCOMPARE(ps3.
count(), 1);
242 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
244 QCOMPARE(ps.
count(), 3);
247 QCOMPARE(ps.
at(1), ps[1]);
248 QCOMPARE(ps.
first(), p);
250 QCOMPARE(ps.
last(), ps.
at(2));
253 QCOMPARE(ps2.
count(), 1);
261 QCOMPARE(ps6.
count(), 1);
262 QCOMPARE(ps6[0], ps[1]);
264 QCOMPARE(ps7.
count(), 2);
265 QCOMPARE(ps7[1], ps[2]);
267 QCOMPARE(ps.
value(2), ps[2]);
268 QCOMPARE(ps.
value(-1), p8);
269 QCOMPARE(ps.
value(3), p8);
270 QCOMPARE(ps.
value(3, p), p);
271 QVERIFY(ps.
value(1, p)!=p);
274 QVERIFY(p9[0]==0.0 || p9[0]==2.0 || p9[0]==4.0);
300 QCOMPARE(p2[0], 2.0);
303 coordT c3[]= {0.0, -1.0, -2.0};
309 QCOMPARE((*i3)[0], 1.0);
311 QCOMPARE(i3[0][0], 1.0);
312 QCOMPARE(i3[0], ps[1]);
345 QCOMPARE(*i2, ps[1]);
348 QCOMPARE(i2, ps.
begin());
350 QCOMPARE(i2+=3, ps.
end());
351 QCOMPARE(i2-=3, ps.
begin());
352 QCOMPARE(i2+0, ps.
begin());
353 QCOMPARE(i2+3, ps.
end());
358 QCOMPARE(i, ps.
begin());
387 QCOMPARE(p2[0], 2.0);
390 coordT c3[]= {0.0, -1.0, -2.0};
396 QCOMPARE((*i3)[0], 1.0);
398 QCOMPARE(i3[0][0], 1.0);
399 QCOMPARE(i3[0][0], 1.0);
400 QCOMPARE(i3[0], ps[1]);
414 QCOMPARE(*i2, ps[1]);
438 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 0, 1};
458 QCOMPARE(ps.
count(p), 2);
459 QCOMPARE(ps.
count(p2), 2);
460 QCOMPARE(ps.
count(p3), 2);
461 QCOMPARE(ps.
count(p4), 0);
462 QCOMPARE(ps.
count(p6), 1);
463 QCOMPARE(ps.
indexOf(&ps[0][0]), 0);
466 QCOMPARE(ps.
indexOf(&ps[3][0]), 3);
501 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
529 QCOMPARE(i.
next(), p);
531 QCOMPARE(i.
next(), p3);
534 QCOMPARE(i.
next(), p);
543 os <<
"Empty QhullPoints\n" << ps << endl;
544 coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
546 os <<
"QhullPoints from c[]\n" << ps2 << endl;
551 os <<
"QhullPoints\n" << ps3;
552 os << ps3.
print(
"message\n");
553 os << ps3.printWithIdentifier(
"w/ identifiers\n");
555 QString s= QString::fromStdString(os.str());
556 QCOMPARE(s.count(
"p"), 8+1);
561 #include "moc/QhullPoints_test.moc"