diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 33315adc06..08c08649d6 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -742,7 +742,11 @@ void tst_QPainterPath::closing() triangle.lineTo(200, 200); QCOMPARE(triangle.elementCount(), 3); + //add this line to make sure closeSubpath() also calls detach() and detached properly + QPainterPath copied = triangle; triangle.closeSubpath(); + QCOMPARE(copied.elementCount(), 3); + QCOMPARE(triangle.elementCount(), 4); QCOMPARE(triangle.elementAt(3).type, QPainterPath::LineToElement); |