diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-19 23:00:13 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-19 23:00:13 (GMT) |
commit | bcba1271a09c48e0bfd5477dd6cf0955ba55b077 (patch) | |
tree | 528bc50c5f98b98bd3ad34b0e8f92cc33e73877d /tests | |
parent | 2530a8b70da9b172ccd041a347f2556c3140c147 (diff) | |
parent | 0cfa6daa4776cd78370e644fae3005ae432b83c7 (diff) | |
download | Qt-bcba1271a09c48e0bfd5477dd6cf0955ba55b077.zip Qt-bcba1271a09c48e0bfd5477dd6cf0955ba55b077.tar.gz Qt-bcba1271a09c48e0bfd5477dd6cf0955ba55b077.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/collections/tst_collections.cpp | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/TEST_GUIDELINES | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qgl/tst_qgl.cpp | 23 | ||||
-rw-r--r-- | tests/auto/qkeysequence/tst_qkeysequence.cpp | 2 |
5 files changed, 30 insertions, 5 deletions
diff --git a/tests/auto/collections/tst_collections.cpp b/tests/auto/collections/tst_collections.cpp index f81535e..43e1a52 100644 --- a/tests/auto/collections/tst_collections.cpp +++ b/tests/auto/collections/tst_collections.cpp @@ -1222,7 +1222,7 @@ void tst_Collections::vector() } } - // this used to trigger an unitialized read in valgrind + // this used to trigger an uninitialized read in valgrind QVector<char> foo; foo.resize(144); diff --git a/tests/auto/declarative/qmlvisual/TEST_GUIDELINES b/tests/auto/declarative/qmlvisual/TEST_GUIDELINES index cb53b6e..469832f 100644 --- a/tests/auto/declarative/qmlvisual/TEST_GUIDELINES +++ b/tests/auto/declarative/qmlvisual/TEST_GUIDELINES @@ -4,4 +4,4 @@ Guidelines for creating new visual tests: 2. Keep it short. It is hoped that these tests can be run regularly, perhaps even for every commit, and if you add up ten seconds for every time someone commits a change to QML then we'll be sitting here for a long time. Completeness is more important than haste, but consider the most time efficient ways to achieve said completeness. Do not forget about snapshot mode (tst_qmlvisual -help for details on -recordsnapshot) when testing that a static scene looks right. -3. Avoid text. Text is relatively unstable due to platform specific peculiarities. If you need to identify an area, consider a unique color as opposed to a unique text label. If you must use Text, TextEdit, or TextInput, use the test-friendlier versions in the 'shared' directory. +3. Avoid text. Text is relatively unstable due to platform specific peculiarities. If you need to identify an area, consider a unique color as opposed to a unique text label. If you must use Text, TextEdit, or TextInput, use the test-friendlier versions in the 'shared' directory. Also keep in mind that text anti-aliasing is disabled during tests for greater consistency, and you should never use point sizes in tests. Text autotests can thus only test some aspects of the elements. diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp index 8d4d0d1..2a15102 100644 --- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp +++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp @@ -104,14 +104,16 @@ void tst_qmlvisual::visual_data() QStringList files; files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR)); if (qgetenv("QMLVISUAL_ALL") != "1") { - //Text on X11 varies per distro - and the CI system is currently using something outdated. #if defined(Q_WS_X11) + //Text on X11 varies per distro - and the CI system is currently using something outdated. foreach(const QString &str, files.filter(QRegExp(".*text.*"))) files.removeAll(str); #endif - //We don't want QWS test results to mire down the CI system #if defined(Q_WS_QWS) + //We don't want QWS test results to mire down the CI system files.clear(); + //Needs at least one test data or it fails anyways + files << QT_TEST_SOURCE_DIR "/selftest_noimages/selftest_noimages.qml"; #endif } diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index e38bf42..cc2cac9 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -97,6 +97,7 @@ private slots: void qglContextDefaultBindTexture(); void textureCleanup(); void threadImages(); + void nullRectCrash(); }; tst_QGL::tst_QGL() @@ -2375,6 +2376,28 @@ void tst_QGL::threadImages() delete widget; } +void tst_QGL::nullRectCrash() +{ + if (!QGLFramebufferObject::hasOpenGLFramebufferObjects()) + QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle); + + QGLWidget glw; + glw.makeCurrent(); + + QGLFramebufferObjectFormat fboFormat; + fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil); + + QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat); + + QPainter fboPainter(fbo); + + fboPainter.setPen(QPen(QColor(255, 127, 127, 127), 2)); + fboPainter.setBrush(QColor(127, 255, 127, 127)); + fboPainter.drawRect(QRectF()); + + fboPainter.end(); +} + class tst_QGLDummy : public QObject { Q_OBJECT diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 60f022f..55c7edf 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -405,7 +405,7 @@ void tst_QKeySequence::mnemonic() #ifndef QT_NO_DEBUG if (warning) { - QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurences of '&'").arg(string); + QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurrences of '&'").arg(string); QTest::ignoreMessage(QtWarningMsg, qPrintable(str)); // qWarning(qPrintable(str)); } |