diff options
Diffstat (limited to 'tests/auto/quick')
-rw-r--r-- | tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp index 204a3ff019..5657ec44a8 100644 --- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp +++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp @@ -79,6 +79,13 @@ void tst_qquickrectangle::gradient() QCOMPARE(stops.at(&stops, 1)->position(), 1.0); QCOMPARE(stops.at(&stops, 1)->color(), QColor("white")); + QGradientStops gradientStops = grad->gradientStops(); + QCOMPARE(gradientStops.count(), 2); + QCOMPARE(gradientStops.at(0).first, 0.0); + QCOMPARE(gradientStops.at(0).second, QColor("gray")); + QCOMPARE(gradientStops.at(1).first, 1.0); + QCOMPARE(gradientStops.at(1).second, QColor("white")); + QMetaObject::invokeMethod(rect, "resetGradient"); grad = rect->gradient(); |