25 using std::ostringstream;
68 QCOMPARE(p12.coordinates(), (
coordT *)0);
71 QCOMPARE(p12.
id(), -3);
80 QCOMPARE(p.coordinates(),
static_cast<double *
>(0));
103 c << 0.0 << 0.0 << 0.0;
105 QCOMPARE(p6,
q.origin());
107 QCOMPARE(p11,
q.origin());
121 QCOMPARE(vs.size(), 3u);
123 QCOMPARE(vs[k], p[k]);
125 QList<double> qs= p.toQList();
126 QCOMPARE(qs.size(), 3);
128 QCOMPARE(qs[k], p[k]);
139 cout <<
"Point ids in 'rbox c'\n";
144 cout <<
"p" <<
id << endl;
147 QCOMPARE(
id, p.
id());
148 QVERIFY(p.
id()>=0 && p.
id()<9);
149 const coordT *
c= p.coordinates();
153 QCOMPARE(
q.qh(), p.
qh());
158 QVERIFY(p3.coordinates()!=p2.coordinates());
174 int idx= (p3.coordinates()-p2.coordinates())/p2.
dimension();
175 QVERIFY(idx>-8 && idx<8);
192 QCOMPARE(p2.coordinates(), p6.coordinates());
207 const coordT *
c= p.coordinates();
209 QCOMPARE(
c[k], p[k]);
214 QCOMPARE(p2[0], 10.0);
245 QCOMPARE((*i3), p[1]);
280 QCOMPARE(i2, p.
begin());
282 QCOMPARE(i2 += 3, p.
end());
283 QCOMPARE(i2 -= 3, p.
begin());
284 QCOMPARE(i2+0, p.
begin());
285 QCOMPARE(i2+3, p.
end());
290 QCOMPARE(i, p.
begin());
324 QCOMPARE((*i3), p[1]);
364 QhullPointIterator i= p2;
366 QVERIFY(!i.hasNext());
367 QVERIFY(!i.hasPrevious());
369 QVERIFY(!i.hasNext());
370 QVERIFY(!i.hasPrevious());
373 QhullPointIterator i2(p);
376 QVERIFY(i2.hasNext());
377 QVERIFY(!i2.hasPrevious());
378 QVERIFY(i.hasNext());
379 QVERIFY(!i.hasPrevious());
382 QVERIFY(!i2.hasNext());
383 QVERIFY(i2.hasPrevious());
384 QVERIFY(i.hasNext());
385 QVERIFY(!i.hasPrevious());
388 QCOMPARE(i.peekNext(), p[0]);
389 QCOMPARE(i2.peekPrevious(), p[2]);
390 QCOMPARE(i2.previous(), p[2]);
391 QCOMPARE(i2.previous(), p[1]);
392 QCOMPARE(i2.previous(), p[0]);
393 QVERIFY(!i2.hasPrevious());
394 QCOMPARE(i.peekNext(), p[0]);
396 QCOMPARE(i.next(), p[0]);
397 QCOMPARE(i.peekNext(), p[1]);
398 QCOMPARE(i.next(), p[1]);
399 QCOMPARE(i.next(), p[2]);
400 QVERIFY(!i.hasNext());
402 QCOMPARE(i.next(), p[0]);
413 QCOMPARE(dist, sqrt(
double(2.0+1.0))/2);
426 os <<
"Point w/ print:\n";
427 os << p.
print(
" message ");
428 os << p.printWithIdentifier(
" Point with id and a message ");
430 QString s= QString::fromStdString(os.str());
431 QCOMPARE(s.count(
"p"), 2);
437 #include "moc/QhullPoint_test.moc"