summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbrush
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qbrush')
-rw-r--r--tests/auto/qbrush/tst_qbrush.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qbrush/tst_qbrush.cpp b/tests/auto/qbrush/tst_qbrush.cpp
index 11f715a..7ef930f 100644
--- a/tests/auto/qbrush/tst_qbrush.cpp
+++ b/tests/auto/qbrush/tst_qbrush.cpp
@@ -44,6 +44,7 @@
#include "qbrush.h"
#include <QPainter>
+#include <QBitmap>
#include <qdebug.h>
@@ -76,6 +77,7 @@ private slots:
void textures();
void nullBrush();
+ void isOpaque();
};
Q_DECLARE_METATYPE(QBrush)
@@ -379,5 +381,14 @@ void tst_QBrush::nullBrush()
QCOMPARE(brush.color(), QColor(100,0,0));
}
+void tst_QBrush::isOpaque()
+{
+ QBitmap bm(8, 8);
+ bm.fill(Qt::black);
+
+ QBrush brush(bm);
+ QVERIFY(!brush.isOpaque());
+}
+
QTEST_MAIN(tst_QBrush)
#include "tst_qbrush.moc"