MCPcopy Create free account
hub / github.com/KDE/kwin / testOperatorPlus

Method testOperatorPlus

autotests/test_window_paint_data.cpp:121–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void TestWindowPaintData::testOperatorPlus()
122{
123 WindowPaintData data;
124 QCOMPARE(data.xTranslation(), 0.0);
125 QCOMPARE(data.yTranslation(), 0.0);
126 QCOMPARE(data.zTranslation(), 0.0);
127 QCOMPARE(data.translation(), QVector3D());
128 // test with point
129 data += QPoint(1, 2);
130 QCOMPARE(data.translation(), QVector3D(1.0, 2.0, 0.0));
131 // test with pointf
132 data += QPointF(0.5, 0.75);
133 QCOMPARE(data.translation(), QVector3D(1.5, 2.75, 0.0));
134 // test with QVector2D
135 data += QVector2D(0.25, 1.5);
136 QCOMPARE(data.translation(), QVector3D(1.75, 4.25, 0.0));
137 // test with QVector3D
138 data += QVector3D(1.0, 2.0, 3.5);
139 QCOMPARE(data.translation(), QVector3D(2.75, 6.25, 3.5));
140}
141
142void TestWindowPaintData::testMultiplyBrightness()
143{

Callers

nothing calls this directly

Calls 6

QPointClass · 0.85
QPointFClass · 0.85
xTranslationMethod · 0.80
yTranslationMethod · 0.80
zTranslationMethod · 0.80
QVector3DClass · 0.50

Tested by

no test coverage detected