aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickshape/tst_qquickshape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickshape/tst_qquickshape.cpp')
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index dcc79e6599..a779b23abd 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -55,6 +55,7 @@ private slots:
void changeSignals();
void render();
void renderWithMultipleSp();
+ void radialGrad();
};
tst_QQuickShape::tst_QQuickShape()
@@ -67,6 +68,7 @@ tst_QQuickShape::tst_QQuickShape()
qmlRegisterType<QQuickShapePath>(uri, 1, 0, "ShapePath");
qmlRegisterUncreatableType<QQuickShapeGradient>(uri, 1, 0, "ShapeGradient", QQuickShapeGradient::tr("ShapeGradient is an abstract base class"));
qmlRegisterType<QQuickShapeLinearGradient>(uri, 1, 0, "LinearGradient");
+ qmlRegisterType<QQuickShapeRadialGradient>(uri, 1, 0, "RadialGradient");
}
void tst_QQuickShape::initValues()
@@ -245,6 +247,23 @@ void tst_QQuickShape::renderWithMultipleSp()
QVERIFY(QQuickVisualTestUtil::compareImages(img.convertToFormat(refImg.format()), refImg));
}
+void tst_QQuickShape::radialGrad()
+{
+ QScopedPointer<QQuickView> window(createView());
+
+ window->setSource(testFileUrl("pathitem5.qml"));
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+
+ QImage img = window->grabWindow();
+ QVERIFY(!img.isNull());
+
+ QImage refImg(testFileUrl("pathitem5.png").toLocalFile());
+ QVERIFY(!refImg.isNull());
+
+ QVERIFY(QQuickVisualTestUtil::compareImages(img.convertToFormat(refImg.format()), refImg));
+}
+
QTEST_MAIN(tst_QQuickShape)
#include "tst_qquickshape.moc"