tests/auto/qbrush/tst_qbrush.cpp
changeset 22 79de32ba3296
parent 18 2f34d5167611
child 30 5dc02b23752f
--- a/tests/auto/qbrush/tst_qbrush.cpp	Mon May 03 13:17:34 2010 +0300
+++ b/tests/auto/qbrush/tst_qbrush.cpp	Fri May 14 16:40:13 2010 +0300
@@ -75,9 +75,10 @@
     void gradientStops();
 
     void textures();
-    
+
     void nullBrush();
     void isOpaque();
+    void debug();
 };
 
 Q_DECLARE_METATYPE(QBrush)
@@ -390,5 +391,15 @@
     QVERIFY(!brush.isOpaque());
 }
 
+void tst_QBrush::debug()
+{
+    QPixmap pixmap_source(10, 10);
+    fill(&pixmap_source);
+    QBrush pixmap_brush;
+    pixmap_brush.setTexture(pixmap_source);
+    QCOMPARE(pixmap_brush.style(), Qt::TexturePattern);
+    qDebug() << pixmap_brush; // don't crash
+}
+
 QTEST_MAIN(tst_QBrush)
 #include "tst_qbrush.moc"