0
|
1 |
/****************************************************************************
|
|
2 |
**
|
|
3 |
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
** All rights reserved.
|
|
5 |
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
6 |
**
|
|
7 |
** This file is part of the test suite of the Qt Toolkit.
|
|
8 |
**
|
|
9 |
** $QT_BEGIN_LICENSE:LGPL$
|
|
10 |
** No Commercial Usage
|
|
11 |
** This file contains pre-release code and may not be distributed.
|
|
12 |
** You may use this file in accordance with the terms and conditions
|
|
13 |
** contained in the Technology Preview License Agreement accompanying
|
|
14 |
** this package.
|
|
15 |
**
|
|
16 |
** GNU Lesser General Public License Usage
|
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
18 |
** General Public License version 2.1 as published by the Free Software
|
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
20 |
** packaging of this file. Please review the following information to
|
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
23 |
**
|
|
24 |
** In addition, as a special exception, Nokia gives you certain additional
|
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
27 |
**
|
|
28 |
** If you have questions regarding the use of this file, please contact
|
|
29 |
** Nokia at qt-info@nokia.com.
|
|
30 |
**
|
|
31 |
**
|
|
32 |
**
|
|
33 |
**
|
|
34 |
**
|
|
35 |
**
|
|
36 |
**
|
|
37 |
**
|
|
38 |
** $QT_END_LICENSE$
|
|
39 |
**
|
|
40 |
****************************************************************************/
|
|
41 |
|
|
42 |
#include <qtest.h>
|
|
43 |
#include <QTransform>
|
|
44 |
|
|
45 |
//TESTED_FILES=
|
|
46 |
|
|
47 |
class tst_QTransform : public QObject
|
|
48 |
{
|
|
49 |
Q_OBJECT
|
|
50 |
|
|
51 |
public:
|
|
52 |
tst_QTransform();
|
|
53 |
virtual ~tst_QTransform();
|
|
54 |
|
|
55 |
public slots:
|
|
56 |
void init();
|
|
57 |
void cleanup();
|
|
58 |
|
|
59 |
private slots:
|
|
60 |
void construct();
|
|
61 |
void translate_data();
|
|
62 |
void translate();
|
|
63 |
void scale_data();
|
|
64 |
void scale();
|
|
65 |
void shear_data();
|
|
66 |
void shear();
|
|
67 |
void rotate_data();
|
|
68 |
void rotate();
|
|
69 |
void rotateXYZ_data();
|
|
70 |
void rotateXYZ();
|
|
71 |
void operatorAssign_data();
|
|
72 |
void operatorAssign();
|
|
73 |
void operatorEqual_data();
|
|
74 |
void operatorEqual();
|
|
75 |
void operatorNotEqual_data();
|
|
76 |
void operatorNotEqual();
|
|
77 |
void operatorMultiply_data();
|
|
78 |
void operatorMultiply();
|
|
79 |
void operatorPlusEqualScalar_data();
|
|
80 |
void operatorPlusEqualScalar();
|
|
81 |
void operatorMinusEqualScalar_data();
|
|
82 |
void operatorMinusEqualScalar();
|
|
83 |
void operatorMultiplyEqual_data();
|
|
84 |
void operatorMultiplyEqual();
|
|
85 |
void operatorMultiplyEqualScalar_data();
|
|
86 |
void operatorMultiplyEqualScalar();
|
|
87 |
void operatorDivideEqualScalar_data();
|
|
88 |
void operatorDivideEqualScalar();
|
|
89 |
void mapQPoint_data();
|
|
90 |
void mapQPoint();
|
|
91 |
void mapQPointF_data();
|
|
92 |
void mapQPointF();
|
|
93 |
void mapRect_data();
|
|
94 |
void mapRect();
|
|
95 |
void mapRectF_data();
|
|
96 |
void mapRectF();
|
|
97 |
void mapQPolygon_data();
|
|
98 |
void mapQPolygon();
|
|
99 |
void mapQPolygonF_data();
|
|
100 |
void mapQPolygonF();
|
|
101 |
void mapQRegion_data();
|
|
102 |
void mapQRegion();
|
|
103 |
void mapToPolygon_data();
|
|
104 |
void mapToPolygon();
|
|
105 |
void mapQPainterPath_data();
|
|
106 |
void mapQPainterPath();
|
|
107 |
void isIdentity_data();
|
|
108 |
void isIdentity();
|
|
109 |
void isAffine_data();
|
|
110 |
void isAffine();
|
|
111 |
void isInvertible_data();
|
|
112 |
void isInvertible();
|
|
113 |
void isRotating_data();
|
|
114 |
void isRotating();
|
|
115 |
void isScaling_data();
|
|
116 |
void isScaling();
|
|
117 |
void isTranslating_data();
|
|
118 |
void isTranslating();
|
|
119 |
void type_data();
|
|
120 |
void type();
|
|
121 |
void determinant_data();
|
|
122 |
void determinant();
|
|
123 |
void adjoint_data();
|
|
124 |
void adjoint();
|
|
125 |
void transposed_data();
|
|
126 |
void transposed();
|
|
127 |
void inverted_data();
|
|
128 |
void inverted();
|
|
129 |
|
|
130 |
private:
|
|
131 |
QMap<const char *, QTransform> generateTransforms() const;
|
|
132 |
};
|
|
133 |
|
|
134 |
tst_QTransform::tst_QTransform()
|
|
135 |
{
|
|
136 |
}
|
|
137 |
|
|
138 |
tst_QTransform::~tst_QTransform()
|
|
139 |
{
|
|
140 |
}
|
|
141 |
|
|
142 |
void tst_QTransform::init()
|
|
143 |
{
|
|
144 |
}
|
|
145 |
|
|
146 |
void tst_QTransform::cleanup()
|
|
147 |
{
|
|
148 |
}
|
|
149 |
|
|
150 |
QMap<const char *, QTransform> tst_QTransform::generateTransforms() const
|
|
151 |
{
|
|
152 |
QMap<const char *, QTransform> x;
|
|
153 |
x["0: identity"] = QTransform();
|
|
154 |
x["1: translate"] = QTransform().translate(10, 10);
|
|
155 |
x["2: translate"] = QTransform().translate(-10, -10);
|
|
156 |
x["3: rotate45"] = QTransform().rotate(45);
|
|
157 |
x["4: rotate90"] = QTransform().rotate(90);
|
|
158 |
x["5: rotate180"] = QTransform().rotate(180);
|
|
159 |
x["6: shear2,2"] = QTransform().shear(2, 2);
|
|
160 |
x["7: shear-2,-2"] = QTransform().shear(-2, -2);
|
|
161 |
x["8: scaleUp2,2"] = QTransform().scale(2, 2);
|
|
162 |
x["9: scaleUp2,3"] = QTransform().scale(2, 3);
|
|
163 |
x["10: scaleDown0.5,0.5"] = QTransform().scale(0.5, 0.5);
|
|
164 |
x["11: scaleDown0.5,0.25"] = QTransform().scale(0.5, 0.25);
|
|
165 |
x["12: rotateX"] = QTransform().rotate(45, Qt::XAxis);
|
|
166 |
x["13: rotateY"] = QTransform().rotate(45, Qt::YAxis);
|
|
167 |
x["14: rotateXY"] = QTransform().rotate(45, Qt::XAxis).rotate(45, Qt::YAxis);
|
|
168 |
x["15: rotateYZ"] = QTransform().rotate(45, Qt::YAxis).rotate(45, Qt::ZAxis);
|
|
169 |
x["16: full"] = QTransform().translate(10, 10).rotate(45).shear(2, 2).scale(2, 2).rotate(45, Qt::YAxis).rotate(45, Qt::XAxis).rotate(45, Qt::ZAxis);
|
|
170 |
return x;
|
|
171 |
}
|
|
172 |
|
|
173 |
void tst_QTransform::construct()
|
|
174 |
{
|
|
175 |
QBENCHMARK {
|
|
176 |
QTransform x;
|
|
177 |
}
|
|
178 |
}
|
|
179 |
|
|
180 |
#define SINGLE_DATA_IMPLEMENTATION(func) \
|
|
181 |
void tst_QTransform::func##_data() \
|
|
182 |
{ \
|
|
183 |
QTest::addColumn<QTransform>("transform"); \
|
|
184 |
QMap<const char *, QTransform> x = generateTransforms(); \
|
|
185 |
QMapIterator<const char *, QTransform> it(x); \
|
|
186 |
while (it.hasNext()) { \
|
|
187 |
it.next(); \
|
|
188 |
QTest::newRow(it.key()) << it.value(); \
|
|
189 |
} \
|
|
190 |
}
|
|
191 |
|
|
192 |
#define DOUBLE_DATA_IMPLEMENTATION(func) \
|
|
193 |
void tst_QTransform::func##_data() \
|
|
194 |
{ \
|
|
195 |
QTest::addColumn<QTransform>("x1"); \
|
|
196 |
QTest::addColumn<QTransform>("x2"); \
|
|
197 |
QMap<const char *, QTransform> x = generateTransforms(); \
|
|
198 |
QMapIterator<const char *, QTransform> it(x); \
|
|
199 |
while (it.hasNext()) { \
|
|
200 |
it.next(); \
|
|
201 |
const char *key1 = it.key(); \
|
|
202 |
QTransform x1 = it.value(); \
|
|
203 |
QMapIterator<const char *, QTransform> it2(x); \
|
|
204 |
while (it2.hasNext()) { \
|
|
205 |
it2.next(); \
|
|
206 |
QTest::newRow(QString("%1 + %2").arg(key1).arg(it2.key()).toLatin1().constData()) \
|
|
207 |
<< x1 << it2.value(); \
|
|
208 |
} \
|
|
209 |
} \
|
|
210 |
}
|
|
211 |
|
|
212 |
SINGLE_DATA_IMPLEMENTATION(translate)
|
|
213 |
|
|
214 |
void tst_QTransform::translate()
|
|
215 |
{
|
|
216 |
QFETCH(QTransform, transform);
|
|
217 |
QTransform x = transform;
|
|
218 |
QBENCHMARK {
|
|
219 |
x.translate(10, 10);
|
|
220 |
}
|
|
221 |
}
|
|
222 |
|
|
223 |
SINGLE_DATA_IMPLEMENTATION(scale)
|
|
224 |
|
|
225 |
void tst_QTransform::scale()
|
|
226 |
{
|
|
227 |
QFETCH(QTransform, transform);
|
|
228 |
QTransform x = transform;
|
|
229 |
QBENCHMARK {
|
|
230 |
x.scale(2, 2);
|
|
231 |
}
|
|
232 |
}
|
|
233 |
|
|
234 |
SINGLE_DATA_IMPLEMENTATION(shear)
|
|
235 |
|
|
236 |
void tst_QTransform::shear()
|
|
237 |
{
|
|
238 |
QFETCH(QTransform, transform);
|
|
239 |
QTransform x = transform;
|
|
240 |
QBENCHMARK {
|
|
241 |
x.shear(2, 2);
|
|
242 |
}
|
|
243 |
}
|
|
244 |
|
|
245 |
SINGLE_DATA_IMPLEMENTATION(rotate)
|
|
246 |
|
|
247 |
void tst_QTransform::rotate()
|
|
248 |
{
|
|
249 |
QFETCH(QTransform, transform);
|
|
250 |
QTransform x = transform;
|
|
251 |
QBENCHMARK {
|
|
252 |
x.rotate(45);
|
|
253 |
}
|
|
254 |
}
|
|
255 |
|
|
256 |
SINGLE_DATA_IMPLEMENTATION(rotateXYZ)
|
|
257 |
|
|
258 |
void tst_QTransform::rotateXYZ()
|
|
259 |
{
|
|
260 |
QFETCH(QTransform, transform);
|
|
261 |
QTransform x = transform;
|
|
262 |
QBENCHMARK {
|
|
263 |
x.rotate(45, Qt::XAxis);
|
|
264 |
x.rotate(45, Qt::YAxis);
|
|
265 |
x.rotate(45, Qt::ZAxis);
|
|
266 |
}
|
|
267 |
}
|
|
268 |
|
|
269 |
DOUBLE_DATA_IMPLEMENTATION(operatorAssign)
|
|
270 |
|
|
271 |
void tst_QTransform::operatorAssign()
|
|
272 |
{
|
|
273 |
QFETCH(QTransform, x1);
|
|
274 |
QFETCH(QTransform, x2);
|
|
275 |
QTransform x = x1;
|
|
276 |
QBENCHMARK {
|
|
277 |
x = x2;
|
|
278 |
}
|
|
279 |
}
|
|
280 |
|
|
281 |
DOUBLE_DATA_IMPLEMENTATION(operatorEqual)
|
|
282 |
|
|
283 |
void tst_QTransform::operatorEqual()
|
|
284 |
{
|
|
285 |
QFETCH(QTransform, x1);
|
|
286 |
QFETCH(QTransform, x2);
|
|
287 |
QTransform x = x1;
|
|
288 |
QBENCHMARK {
|
|
289 |
x == x2;
|
|
290 |
}
|
|
291 |
}
|
|
292 |
|
|
293 |
DOUBLE_DATA_IMPLEMENTATION(operatorNotEqual)
|
|
294 |
|
|
295 |
void tst_QTransform::operatorNotEqual()
|
|
296 |
{
|
|
297 |
QFETCH(QTransform, x1);
|
|
298 |
QFETCH(QTransform, x2);
|
|
299 |
QTransform x = x1;
|
|
300 |
QBENCHMARK {
|
|
301 |
x != x2;
|
|
302 |
}
|
|
303 |
}
|
|
304 |
|
|
305 |
DOUBLE_DATA_IMPLEMENTATION(operatorMultiply)
|
|
306 |
|
|
307 |
void tst_QTransform::operatorMultiply()
|
|
308 |
{
|
|
309 |
QFETCH(QTransform, x1);
|
|
310 |
QFETCH(QTransform, x2);
|
|
311 |
QTransform x = x1;
|
|
312 |
QBENCHMARK {
|
|
313 |
x * x2;
|
|
314 |
}
|
|
315 |
}
|
|
316 |
|
|
317 |
SINGLE_DATA_IMPLEMENTATION(operatorPlusEqualScalar)
|
|
318 |
|
|
319 |
void tst_QTransform::operatorPlusEqualScalar()
|
|
320 |
{
|
|
321 |
QFETCH(QTransform, transform);
|
|
322 |
QTransform x = transform;
|
|
323 |
QBENCHMARK {
|
|
324 |
x += 3.14;
|
|
325 |
}
|
|
326 |
}
|
|
327 |
|
|
328 |
SINGLE_DATA_IMPLEMENTATION(operatorMinusEqualScalar)
|
|
329 |
|
|
330 |
void tst_QTransform::operatorMinusEqualScalar()
|
|
331 |
{
|
|
332 |
QFETCH(QTransform, transform);
|
|
333 |
QTransform x = transform;
|
|
334 |
QBENCHMARK {
|
|
335 |
x -= 3.14;
|
|
336 |
}
|
|
337 |
}
|
|
338 |
|
|
339 |
DOUBLE_DATA_IMPLEMENTATION(operatorMultiplyEqual)
|
|
340 |
|
|
341 |
void tst_QTransform::operatorMultiplyEqual()
|
|
342 |
{
|
|
343 |
QFETCH(QTransform, x1);
|
|
344 |
QFETCH(QTransform, x2);
|
|
345 |
QTransform x = x1;
|
|
346 |
QBENCHMARK {
|
|
347 |
x *= x2;
|
|
348 |
}
|
|
349 |
}
|
|
350 |
|
|
351 |
SINGLE_DATA_IMPLEMENTATION(operatorMultiplyEqualScalar)
|
|
352 |
|
|
353 |
void tst_QTransform::operatorMultiplyEqualScalar()
|
|
354 |
{
|
|
355 |
QFETCH(QTransform, transform);
|
|
356 |
QTransform x = transform;
|
|
357 |
QBENCHMARK {
|
|
358 |
x * 3;
|
|
359 |
}
|
|
360 |
}
|
|
361 |
|
|
362 |
SINGLE_DATA_IMPLEMENTATION(operatorDivideEqualScalar)
|
|
363 |
|
|
364 |
void tst_QTransform::operatorDivideEqualScalar()
|
|
365 |
{
|
|
366 |
QFETCH(QTransform, transform);
|
|
367 |
QTransform x = transform;
|
|
368 |
QBENCHMARK {
|
|
369 |
x /= 3;
|
|
370 |
}
|
|
371 |
}
|
|
372 |
|
|
373 |
SINGLE_DATA_IMPLEMENTATION(mapQPoint)
|
|
374 |
|
|
375 |
void tst_QTransform::mapQPoint()
|
|
376 |
{
|
|
377 |
QFETCH(QTransform, transform);
|
|
378 |
QTransform x = transform;
|
|
379 |
QBENCHMARK {
|
|
380 |
x.map(QPoint(3, 3));
|
|
381 |
}
|
|
382 |
}
|
|
383 |
|
|
384 |
SINGLE_DATA_IMPLEMENTATION(mapQPointF)
|
|
385 |
|
|
386 |
void tst_QTransform::mapQPointF()
|
|
387 |
{
|
|
388 |
QFETCH(QTransform, transform);
|
|
389 |
QTransform x = transform;
|
|
390 |
QBENCHMARK {
|
|
391 |
x.map(QPointF(3, 3));
|
|
392 |
}
|
|
393 |
}
|
|
394 |
|
|
395 |
SINGLE_DATA_IMPLEMENTATION(mapRect)
|
|
396 |
|
|
397 |
void tst_QTransform::mapRect()
|
|
398 |
{
|
|
399 |
QFETCH(QTransform, transform);
|
|
400 |
QTransform x = transform;
|
|
401 |
QBENCHMARK {
|
|
402 |
x.mapRect(QRect(0, 0, 100, 100));
|
|
403 |
}
|
|
404 |
}
|
|
405 |
|
|
406 |
SINGLE_DATA_IMPLEMENTATION(mapRectF)
|
|
407 |
|
|
408 |
void tst_QTransform::mapRectF()
|
|
409 |
{
|
|
410 |
QFETCH(QTransform, transform);
|
|
411 |
QTransform x = transform;
|
|
412 |
QBENCHMARK {
|
|
413 |
x.mapRect(QRectF(0, 0, 100, 100));
|
|
414 |
}
|
|
415 |
}
|
|
416 |
|
|
417 |
SINGLE_DATA_IMPLEMENTATION(mapQPolygon)
|
|
418 |
|
|
419 |
void tst_QTransform::mapQPolygon()
|
|
420 |
{
|
|
421 |
QFETCH(QTransform, transform);
|
|
422 |
QTransform x = transform;
|
|
423 |
QPolygon poly = QPolygon(QRect(0, 0, 100, 100));
|
|
424 |
QBENCHMARK {
|
|
425 |
x.map(poly);
|
|
426 |
}
|
|
427 |
}
|
|
428 |
|
|
429 |
SINGLE_DATA_IMPLEMENTATION(mapQPolygonF)
|
|
430 |
|
|
431 |
void tst_QTransform::mapQPolygonF()
|
|
432 |
{
|
|
433 |
QFETCH(QTransform, transform);
|
|
434 |
QTransform x = transform;
|
|
435 |
QPolygonF poly = QPolygonF(QRectF(0, 0, 100, 100));
|
|
436 |
QBENCHMARK {
|
|
437 |
x.map(poly);
|
|
438 |
}
|
|
439 |
}
|
|
440 |
|
|
441 |
SINGLE_DATA_IMPLEMENTATION(mapQRegion)
|
|
442 |
|
|
443 |
void tst_QTransform::mapQRegion()
|
|
444 |
{
|
|
445 |
QFETCH(QTransform, transform);
|
|
446 |
QTransform x = transform;
|
|
447 |
QRegion region;
|
|
448 |
for (int i = 0; i < 10; ++i)
|
|
449 |
region += QRect(i * 10, i * 10, 100, 100);
|
|
450 |
QBENCHMARK {
|
|
451 |
x.map(region);
|
|
452 |
}
|
|
453 |
}
|
|
454 |
|
|
455 |
SINGLE_DATA_IMPLEMENTATION(mapToPolygon)
|
|
456 |
|
|
457 |
void tst_QTransform::mapToPolygon()
|
|
458 |
{
|
|
459 |
QFETCH(QTransform, transform);
|
|
460 |
QTransform x = transform;
|
|
461 |
QBENCHMARK {
|
|
462 |
x.mapToPolygon(QRect(0, 0, 100, 100));
|
|
463 |
}
|
|
464 |
}
|
|
465 |
|
|
466 |
|
|
467 |
SINGLE_DATA_IMPLEMENTATION(mapQPainterPath)
|
|
468 |
|
|
469 |
void tst_QTransform::mapQPainterPath()
|
|
470 |
{
|
|
471 |
QFETCH(QTransform, transform);
|
|
472 |
QTransform x = transform;
|
|
473 |
QPainterPath path;
|
|
474 |
for (int i = 0; i < 10; ++i)
|
|
475 |
path.addEllipse(i * 10, i * 10, 100, 100);
|
|
476 |
QBENCHMARK {
|
|
477 |
x.map(path);
|
|
478 |
}
|
|
479 |
}
|
|
480 |
|
|
481 |
SINGLE_DATA_IMPLEMENTATION(isIdentity)
|
|
482 |
|
|
483 |
void tst_QTransform::isIdentity()
|
|
484 |
{
|
|
485 |
QFETCH(QTransform, transform);
|
|
486 |
QBENCHMARK {
|
|
487 |
transform.isIdentity();
|
|
488 |
}
|
|
489 |
}
|
|
490 |
|
|
491 |
SINGLE_DATA_IMPLEMENTATION(isAffine)
|
|
492 |
|
|
493 |
void tst_QTransform::isAffine()
|
|
494 |
{
|
|
495 |
QFETCH(QTransform, transform);
|
|
496 |
QBENCHMARK {
|
|
497 |
transform.isAffine();
|
|
498 |
}
|
|
499 |
}
|
|
500 |
|
|
501 |
SINGLE_DATA_IMPLEMENTATION(isInvertible)
|
|
502 |
|
|
503 |
void tst_QTransform::isInvertible()
|
|
504 |
{
|
|
505 |
QFETCH(QTransform, transform);
|
|
506 |
QBENCHMARK {
|
|
507 |
transform.isInvertible();
|
|
508 |
}
|
|
509 |
}
|
|
510 |
|
|
511 |
SINGLE_DATA_IMPLEMENTATION(isRotating)
|
|
512 |
|
|
513 |
void tst_QTransform::isRotating()
|
|
514 |
{
|
|
515 |
QFETCH(QTransform, transform);
|
|
516 |
QBENCHMARK {
|
|
517 |
transform.isRotating();
|
|
518 |
}
|
|
519 |
}
|
|
520 |
|
|
521 |
SINGLE_DATA_IMPLEMENTATION(isScaling)
|
|
522 |
|
|
523 |
void tst_QTransform::isScaling()
|
|
524 |
{
|
|
525 |
QFETCH(QTransform, transform);
|
|
526 |
QBENCHMARK {
|
|
527 |
transform.isScaling();
|
|
528 |
}
|
|
529 |
}
|
|
530 |
|
|
531 |
SINGLE_DATA_IMPLEMENTATION(isTranslating)
|
|
532 |
|
|
533 |
void tst_QTransform::isTranslating()
|
|
534 |
{
|
|
535 |
QFETCH(QTransform, transform);
|
|
536 |
QBENCHMARK {
|
|
537 |
transform.isTranslating();
|
|
538 |
}
|
|
539 |
}
|
|
540 |
|
|
541 |
SINGLE_DATA_IMPLEMENTATION(type)
|
|
542 |
|
|
543 |
void tst_QTransform::type()
|
|
544 |
{
|
|
545 |
QFETCH(QTransform, transform);
|
|
546 |
QBENCHMARK {
|
|
547 |
transform.type();
|
|
548 |
}
|
|
549 |
}
|
|
550 |
|
|
551 |
SINGLE_DATA_IMPLEMENTATION(determinant)
|
|
552 |
|
|
553 |
void tst_QTransform::determinant()
|
|
554 |
{
|
|
555 |
QFETCH(QTransform, transform);
|
|
556 |
QBENCHMARK {
|
|
557 |
transform.determinant();
|
|
558 |
}
|
|
559 |
}
|
|
560 |
|
|
561 |
SINGLE_DATA_IMPLEMENTATION(adjoint)
|
|
562 |
|
|
563 |
void tst_QTransform::adjoint()
|
|
564 |
{
|
|
565 |
QFETCH(QTransform, transform);
|
|
566 |
QBENCHMARK {
|
|
567 |
transform.adjoint();
|
|
568 |
}
|
|
569 |
}
|
|
570 |
|
|
571 |
SINGLE_DATA_IMPLEMENTATION(transposed)
|
|
572 |
|
|
573 |
void tst_QTransform::transposed()
|
|
574 |
{
|
|
575 |
QFETCH(QTransform, transform);
|
|
576 |
QBENCHMARK {
|
|
577 |
transform.transposed();
|
|
578 |
}
|
|
579 |
}
|
|
580 |
|
|
581 |
SINGLE_DATA_IMPLEMENTATION(inverted)
|
|
582 |
|
|
583 |
void tst_QTransform::inverted()
|
|
584 |
{
|
|
585 |
QFETCH(QTransform, transform);
|
|
586 |
QBENCHMARK {
|
|
587 |
transform.inverted();
|
|
588 |
}
|
|
589 |
}
|
|
590 |
|
|
591 |
QTEST_MAIN(tst_QTransform)
|
|
592 |
#include "tst_qtransform.moc"
|