Changeset View
Changeset View
Standalone View
Standalone View
autotests/test_screen_paint_data.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
58 | QCOMPARE(data.rotationAngle(), 0.0); | 58 | QCOMPARE(data.rotationAngle(), 0.0); | ||
59 | QCOMPARE(data.rotationOrigin(), QVector3D()); | 59 | QCOMPARE(data.rotationOrigin(), QVector3D()); | ||
60 | QCOMPARE(data.rotationAxis(), QVector3D(0.0, 0.0, 1.0)); | 60 | QCOMPARE(data.rotationAxis(), QVector3D(0.0, 0.0, 1.0)); | ||
61 | QCOMPARE(data.outputGeometry(), QRect()); | 61 | QCOMPARE(data.outputGeometry(), QRect()); | ||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | void TestScreenPaintData::testCopyCtor() | 64 | void TestScreenPaintData::testCopyCtor() | ||
65 | { | 65 | { | ||
66 | ScreenPaintData data(QMatrix4x4(), QRect(10, 20, 30, 40)); | 66 | ScreenPaintData data(QMatrix4x4(), 0, QRect(10, 20, 30, 40)); | ||
67 | ScreenPaintData data2(data); | 67 | ScreenPaintData data2(data); | ||
68 | // no value had been changed | 68 | // no value had been changed | ||
69 | QCOMPARE(data2.xScale(), 1.0); | 69 | QCOMPARE(data2.xScale(), 1.0); | ||
70 | QCOMPARE(data2.yScale(), 1.0); | 70 | QCOMPARE(data2.yScale(), 1.0); | ||
71 | QCOMPARE(data2.zScale(), 1.0); | 71 | QCOMPARE(data2.zScale(), 1.0); | ||
72 | QCOMPARE(data2.xTranslation(), 0.0); | 72 | QCOMPARE(data2.xTranslation(), 0.0); | ||
73 | QCOMPARE(data2.yTranslation(), 0.0); | 73 | QCOMPARE(data2.yTranslation(), 0.0); | ||
74 | QCOMPARE(data2.zTranslation(), 0.0); | 74 | QCOMPARE(data2.zTranslation(), 0.0); | ||
Show All 20 Lines | |||||
95 | QCOMPARE(data3.rotationAngle(), 45.0); | 95 | QCOMPARE(data3.rotationAngle(), 45.0); | ||
96 | QCOMPARE(data3.rotationOrigin(), QVector3D(1.0, 2.0, 3.0)); | 96 | QCOMPARE(data3.rotationOrigin(), QVector3D(1.0, 2.0, 3.0)); | ||
97 | QCOMPARE(data3.rotationAxis(), QVector3D(1.0, 1.0, 0.0)); | 97 | QCOMPARE(data3.rotationAxis(), QVector3D(1.0, 1.0, 0.0)); | ||
98 | } | 98 | } | ||
99 | 99 | | |||
100 | void TestScreenPaintData::testAssignmentOperator() | 100 | void TestScreenPaintData::testAssignmentOperator() | ||
101 | { | 101 | { | ||
102 | ScreenPaintData data; | 102 | ScreenPaintData data; | ||
103 | ScreenPaintData data2(QMatrix4x4(), QRect(10, 20, 30, 40)); | 103 | ScreenPaintData data2(QMatrix4x4(), 0, QRect(10, 20, 30, 40)); | ||
104 | 104 | | |||
105 | data2.setScale(QVector3D(0.5, 2.0, 3.0)); | 105 | data2.setScale(QVector3D(0.5, 2.0, 3.0)); | ||
106 | data2.translate(0.5, 2.0, 3.0); | 106 | data2.translate(0.5, 2.0, 3.0); | ||
107 | data2.setRotationAngle(45.0); | 107 | data2.setRotationAngle(45.0); | ||
108 | data2.setRotationOrigin(QVector3D(1.0, 2.0, 3.0)); | 108 | data2.setRotationOrigin(QVector3D(1.0, 2.0, 3.0)); | ||
109 | data2.setRotationAxis(QVector3D(1.0, 1.0, 0.0)); | 109 | data2.setRotationAxis(QVector3D(1.0, 1.0, 0.0)); | ||
110 | QCOMPARE(data2.outputGeometry(), QRect(10, 20, 30, 40)); | 110 | QCOMPARE(data2.outputGeometry(), QRect(10, 20, 30, 40)); | ||
111 | 111 | | |||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |