summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 76b3a4f6cc..7e6313295b 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -82,6 +82,7 @@ private slots:
void windowModality_QTBUG27039();
void visibility();
void mask();
+ void initialSize();
void initTestCase()
{
@@ -1186,6 +1187,32 @@ void tst_QWindow::mask()
QCOMPARE(window.mask(), mask);
}
+void tst_QWindow::initialSize()
+{
+ QSize defaultSize(0,0);
+ {
+ Window w;
+ w.show();
+ QTRY_VERIFY(w.width() > 0);
+ QTRY_VERIFY(w.height() > 0);
+ defaultSize = QSize(w.width(), w.height());
+ }
+ {
+ Window w;
+ w.setWidth(200);
+ w.show();
+ QTRY_COMPARE(w.width(), 200);
+ QTRY_VERIFY(w.height() > 0);
+ }
+ {
+ Window w;
+ w.resize(200, 42);
+ w.show();
+ QTRY_COMPARE(w.width(), 200);
+ QTRY_COMPARE(w.height(), 42);
+ }
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow)