summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove Q_ASSERT from QLibrary autotestJason McDonald2011-05-181-1/+1
| | | | | | | | | | Report a regular test failure rather than aborting when an unknown operation is requested. Change-Id: I3678f42f9e9f895d8d0d49a768d4c8b575d1863f Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 22aa68ecec96da4d14a4c9fe2f6e4a337b13b4a3)
* Remove Q_ASSERT from QSharedPointer autotestJason McDonald2011-05-181-1/+2
| | | | | | | | | | Report a meaningful fatal error instead of aborting in debug mode builds and failing silently in release mode builds. Change-Id: I0f939dc40810f072a3e24aeba085191793c49ef3 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95)
* Remove Q_ASSERT from QThread autotestJason McDonald2011-05-181-1/+1
| | | | | | | | | | Report a meaningful fatal error instead of aborting in debug mode builds and failing silently in release mode builds. Change-Id: If9a6c0655e021b3bb6b7d894aefd9bbcc58e4605 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit fed42f25e129af1f4f2c03a075530ad7111d2fdd)
* Remove Q_ASSERT's from QWizard autotestJason McDonald2011-05-181-10/+11
| | | | | | | | | | | Combine the two checking functions (check and checkInvariant) and have the resulting check function return a bool instead of asserting so that the test function can QVERIFY and fail gracefully. Change-Id: Ib069b5424483ba6ffb9caf75036c4f325e9dba51 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a54900d2227bfb2021c5d1255817824aff11cf32)
* Remove mention of Q_ASSERT in commentsJason McDonald2011-05-181-1/+1
| | | | | | | | | This will make it easier to check for stray Q_ASSERT's in the future. Change-Id: I5ddafe1bf26819566460920deae8ff448008c93f Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit b2db13f245f09f1d14af64d2199284c78cbb5b6e)
* Remove Q_ASSERT's from QVariant autotest.Jason McDonald2011-05-181-5/+8
| | | | | | | | | | Print a meaningful warning message instead of aborting in debug mode builds and failing silently in release mode builds. Change-Id: I44143c5fbe6b6af87bdf5bd231cfaf9a3c9c33f8 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a8dc321b6669dd263a25a0cb5766e5b7150c6e20)
* Remove Q_ASSERT from QTextOdfWriter autotestJason McDonald2011-05-181-4/+7
| | | | | | | | | | If the <dummy> tag can't be found in the data, return an empty string rather than asserting, so that the test fails gracefully. Change-Id: I536f08c9c3e942817680849d96d035999d4994db Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a88dd1c5f62b5ded8ea0d76d185127ef28549c72)
* Remove Q_ASSERT from qtesselator autotestJason McDonald2011-05-181-2/+6
| | | | | | | | | | | If the test data is incorrect, print a meaningful warning into the test output instead of deferencing an iterator beyond the last element in the list. Change-Id: I7be4f282639453de6d8240a2f17253025b415337 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit f01e2a5024db69913aed016e2854b2589ca85080)
* Remove Q_ASSERT from qsslsocket autotest.Rohan McGovern2011-05-181-2/+2
| | | | | | | | | | | | | | Make the server thread exit early if the socket is invalid. This will make the test fail gracefully instead of crashing. Change-Id: Ia9564c94dd32d65e6e9bdb4a2410f1512409546c Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit b9b3ced2eafe13e491d5af5ad7432733941bfd8d) Conflicts: tests/auto/qsslsocket/tst_qsslsocket.cpp
* Remove Q_ASSERT's from qsharedpointer autotestJason McDonald2011-05-181-4/+10
| | | | | | | | | | Report a meaningful warning message into the test output rather than aborting in debug mode and doing nothing in release mode. Change-Id: I6883fccbce0139c763f36f6839bb3452d8f69c1c Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 5b86c4abc676b36d60e6625e89535e7f4907d2b3)
* Remove Q_ASSERT's from QObject autotest.Jason McDonald2011-05-181-2/+20
| | | | | | | | | | | | | | The Receiver class has two slots that aren't meant to get called during the test (they're there to catch broken parsing of slot names). Rather than asserting when one of them gets called, which does nothing in a release mode build, this commit makes the slots record the number of times they were called (as for the other slots in the test) and fails the test gracefully if either of those slots was called. Change-Id: Ia0393026cb96ffdc6190b5e7bd951f75d231b11e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 7bd6ca895e5fa4de197d9d7bf2e7b578c01c3c2a)
* Remove Q_ASSERT's from QMetaType autotest.Jason McDonald2011-05-181-5/+27
| | | | | | | | | | Instead of asserting in debug mode and doing nothing in release mode, put specific warnings in the test output and fail the test gracefully. Change-Id: I453a0ab7ddef5b2acf55f77f71a59a940d93ae54 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a3b2fa3f1beffa7709c11522d4e2db9ec8f952e0)
* Remove Q_ASSERT from QMetaObject autotest.Jason McDonald2011-05-181-2/+12
| | | | | | | | | | Issue a helpful warning rather than ignoring the error in release mode builds. Change-Id: Iea7bf4d63f8227abaf7dcf1700c5fef62763afad Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 6f082a3fdd368cd7a969b7f324354583d081da82)
* Change Q_ASSERT to QVERIFY in QMenu test.Jason McDonald2011-05-181-1/+1
| | | | | | | Change-Id: Ifc08d4eabd8565cfd242ec2e70cf597e92f28fe3 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 291f04a4a7be4a975c6b8eaeeed4e0c196e23128)
* Remove Q_ASSERT from qitemview autotestJason McDonald2011-05-182-7/+19
| | | | | | | | | | | | | Allow createView() to return a null view on failure (which it already did in release mode builds), but fail the test gracefully instead of crashing when a null view is returned. Also reordered the code slightly to put all the QFETCH's together. Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern Change-Id: I3a41c738cb0e4e860db2342b30817a804b20f30d (cherry picked from commit 51b1d8dc20a2557d2002550b03e5b9f37f425fb4)
* Remove Q_ASSERT from qitemmodel autotestJason McDonald2011-05-182-1/+12
| | | | | | | | | | | Allow createModel() to return a null model on failure (which it already did in release mode builds), but fail the test gracefully instead of crashing when a null model is returned. Change-Id: Iaa0ec31183e0c90fcea512223d01e07ed188a380 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 0d773d839e39f4f4bfd0bf9d652e4f2650adfcb0)
* Remove mention of Q_ASSERT from qheaderview autotestJason McDonald2011-05-181-1/+1
| | | | | | | Change-Id: I3a97411c0b53345bffbadb60a3e7caabfb0441d2 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a388e104febb131cd35438bbb1397eeab41d3ab8)
* Remove dead code from qgraphicsgridlayout autotestJason McDonald2011-05-181-33/+0
| | | | | | | Change-Id: I230d1ec9dfd5df2a0fac161a03090308b7f07a1e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 012b2d8198b8cfe39a66025334ed9ae2a045a68c)
* Remove Q_ASSERT from qgraphicsanchorlayout testJason McDonald2011-05-181-1/+3
| | | | | | | | | | | | Q_ASSERT will only catch a violation of the precondition of the checkReverseDirection function in a debug build. This commit replaces the Q_ASSERT with QVERIFY'ing the precondition (that the widget has a layout) before calling the function. Change-Id: Ibaa2b52b7d67fa20784e0df022e8c8169da0e50e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit d1011fc9328fa335bc69a065b29e77ce60608c55)
* Remove Q_ASSERTs from qgraphicsanchorlayout1 testJason McDonald2011-05-181-16/+6
| | | | | | | | | Sanity-check the test data when using it rather than when creating it. Change-Id: Ie5d5e1ff3fc439d196096f17cb6f97680927a90c Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 2c64404e2edd3b792b8a1d04c773860d40c04c4c)
* Only ignore warning when it can actually be produced.Jason McDonald2011-05-181-1/+1
| | | | | | | | | | | Fix regression introduced in 3ca51d87296bcb3098d7de14294fef9294fd5ed4. The warning is only generated in builds where QT_NO_DEBUG is not defined *and* the target is not Mac OS X. Change-Id: I7245f2eab8ea47ab7495fef874b2f8a29186b659 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 60e5ed805af1e11aaec426b823df209b4c895c29)
* Use meaningful variable namesJason McDonald2011-05-181-21/+21
| | | | | | | | | Make the meaning of the code more obvious and avoid a compiler warning about the variable "w" being overridden. Change-Id: Ib76d3aa1cae46e263b2ab61b675d9ef74032aacc Reviewed-by: Rohan McGovern (cherry picked from commit 59634e825f1efa6f32befc8767cafedfeb9b7d59)
* Fix logic error in large file autotestJason McDonald2011-05-181-3/+2
| | | | | | | | | | | | | | | The function generating data blocks was filling the block to 16 bytes short of the blockSize, then appending three 8 byte values, causing the block to grow 8 bytes beyond blockSize and then truncating it back to blockSize. This commit makes the code fill the block to 24 bytes short of the blockSize, so that the block will always end up at the correct size and truncation is not needed. Change-Id: I9fe6e6d6cf7bc445513b53e0a910d205c4c8002f Reviewed-by: Rohan McGovern (cherry picked from commit b1eb564830ff1b754de14919ce5c1547e9758f7c)
* Remove Q_ASSERT from QDom autotestJason McDonald2011-05-181-11/+7
| | | | | | | | | | The Q_ASSERT here should really be a QVERIFY. Expanded the trivial helper function to make it more obvious what the test does. Change-Id: Ia6017fe820a83b4d6101e5edcfcb68993eef233a Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 6181805f9ea66b37ee164bd67bdac2ac9d53fb65)
* Remove Q_ASSERT from datetimeedit autotestJason McDonald2011-05-181-9/+2
| | | | | | | | | | | The assert and the last four parameters of makeList() are not needed. The function is always used to make lists of three integers and the data are all >= 0. Change-Id: I93ae5a5f541cde2ff61bd9dd21164ed4a9b57403 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit e754832eff8e1a35fc2681ae69b6e3b1ad666ddb)
* Remove Q_ASSERT from qcopchannel autotestJason McDonald2011-05-181-1/+5
| | | | | | | | | | | | This code would assert in a debug build and potentially crash in a release build. (The behaviour of QStringList::at() with an out-of-bounds index is undefined.) This commit makes the program exit with a useful error message in all builds. Change-Id: Ia57a2e5693eb25d3eb0b9ba701ed485dfbc1e846 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 5a530f6171a9569d1a35cd8cd1015ec796b048cc)
* Remove Q_ASSERT from QCompleter autotestJason McDonald2011-05-181-4/+6
| | | | | | | | | | | If a combobox had no completer, this test would assert in a debug build and crash in a release build. This commit makes the test report a test failure and avoid terminating in all builds. Change-Id: Ib2924412e3d55f10875675cb65079259cd4ef552 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit a5bd4abed834ce3670b2f28d4f932d612a033b36)
* Only ignore warning when it can actually be produced.Jason McDonald2011-05-181-0/+2
| | | | | | | | | | | Fix regression introduced in 3ca51d87296bcb3098d7de14294fef9294fd5ed4. The warning is only generated in builds where QT_NO_DEBUG is not defined. Change-Id: I9aa3db369094f4046062b5dc1dc694342208ee45 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 67bc4990f7541cca089882a8c3be1b2b8d98cd4c)
* Remove Q_ASSERT from qcompleter autotest.Jason McDonald2011-05-181-1/+3
| | | | | | | | | | Replace obscure failure on bad test data in debug builds with an informative warning in all builds. Change-Id: I9001820f34de2f78bf296a2f0e095ce73d9ac4bd Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 34c077faae538adc12d4aa28113640570dfc8728)
* Remove Q_ASSERT from qatomicint/pointer autotestsJason McDonald2011-05-182-4/+2
| | | | | | | | | | | | Some code in these tests is not intended to be executed, but rather to detect compiler warnings. Instead of having an obscure fatal error if this code is run in a debug build, it now has a clear fatal error if run in any build. Change-Id: I1c9d27bb14ebf3313865b68e3e57668ba1d14e25 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 70f42ced8e01ddf0098b143e5804c22d55ebf16f)
* Fix remaining warnings in accessibility autotestJason McDonald2011-05-181-32/+40
| | | | | | | | | Prevent warnings about unhandled accessibility events by managing object lifetimes appropriately. Change-Id: If72a2a6a76527ff746b99634c2d0895354570724 Reviewed-by: Rohan McGovern (cherry picked from commit bf1d860143ff40330c6e8f3e2872f2ae812adaa7)
* Ignore expected warning in accessibility autotestJason McDonald2011-05-181-0/+2
| | | | | | Change-Id: I4b614766d2451dde51ab1207267301a2fe7dd0f6 Reviewed-by: Rohan McGovern (cherry picked from commit 3ca51d87296bcb3098d7de14294fef9294fd5ed4)
* If accessibility isn't built, don't try to test itRohan McGovern2011-05-183-218/+7
| | | | | | | | | | | | | Only build the autotest when the feature to be tested is in the Qt build. This is better than building and running an empty test. Change-Id: I67721f5f48296afcca64f761d12325f8e040f2d8 Reviewed-by: Rohan McGovern (cherry picked from commit cf911bc0d297ed30e615fd115b0d3ae574cb2412) Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp
* Remove unused function.Jason McDonald2011-05-181-42/+0
| | | | | | Change-Id: I197ca88e04a68dca0ea819d6e335a02607e597aa Reviewed-by: Trust Me (cherry picked from commit 1a98c473fbcbb6a9edf1b7e42babbad7d901edb4)
* Remove Q_ASSERT from accessibility autotestJason McDonald2011-05-181-2/+3
| | | | | | | | | | | Instead of crashing when we can't get a QAccessibleInterface for a widget, output a useful warning and return a value that makes the test fail gracefully. Change-Id: I0b292cdd8f5a59e26bdc9b0b67cea2b58591df7d Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit d8dc5bfdff25d72e8276c6e80080d72315abe7e0)
* Remove unused functions.Jason McDonald2011-05-181-12/+0
| | | | | | Change-Id: I8cae0550c58238bd99bc759c21b022c54fe2de8b Reviewed-by: Trust Me (cherry picked from commit 1191dc0c278ddd22556d6c8e5ea5a898fa7b35f6)
* Remove Q_ASSERT calls from gestures autotestJason McDonald2011-05-181-2/+2
| | | | | | | | | | | Make the test report a useful warning, rather than terminating with an unintelligible assertion failure, if the GestureState enum is ever extended. Change-Id: Ib876a5f2986cbea4e181678a83a72e0d1444f1ee Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit ed5dd84582881bc30a5ce85902b37aae9c243978)
* Cosmetic changes to exceptionsafety_objects testJason McDonald2011-05-181-18/+15
| | | | | | | | Sort test data alphabetically and remove excess whitespace. Change-Id: I0e244efca9e9adbe747a375a28a63f70992ef4f8 Reviewed-by: Trust Me (cherry picked from commit 10f3f270c8a319205590ae13bdeab063d5216441)
* Don't try to run exceptionsafety_objects test by default on windows.Jason McDonald2011-05-181-1/+2
| | | | | | | | | This test relies on some API specific to MSVC's debug runtime, which is not always guaranteed to be available. Change-Id: Ib0ae4694ad51f59198dadfce802f0dfdf0522002 Reviewed-by: Rohan McGovern (cherry picked from commit 01dfb9ca25bfaec5784f404dcd4bf41bbc2b6fcb)
* Partially re-enable exception safety testJason McDonald2011-05-181-2/+44
| | | | | | | | Re-enabling for object types that don't crash the test. Change-Id: I8c2f0d02171c973bf1ede227d4139b52cac5939f Reviewed-by: Rohan McGovern (cherry picked from commit 3788a90338e9328710b9d3335a63fb85ab7d97fc)
* Make test compile in namespaced build.Jason McDonald2011-05-181-0/+2
| | | | | | Change-Id: I824864b8db755a8dc731e3c9de39e3dd7b16224a Reviewed-by: Rohan McGovern (cherry picked from commit ced0a98b5274be6a62ae7e4a0f9fc3161d0e40cb)
* Rename test class.Jason McDonald2011-05-181-16/+16
| | | | | | | | | Fixes warning from tst_maketestselftest about test class name not matching TARGET. Change-Id: I7a81d87bb64d2902e842d097248e33eacb388746 Reviewed-by: Rohan McGovern (cherry picked from commit 069e4441f2e14a82b4ae39601734acb71c909bd9)
* Make tst_exceptionsafety_objects part of the test set.Jason McDonald2011-05-182-1/+3
| | | | | | | | | Re-enable this test, with the two test functions that fail on Linux disabled until the failures can be diagnosed. Change-Id: I915e1a0d675cb71a80086e89f9799a4f9f6b600c Reviewed-by: Rohan McGovern (cherry picked from commit ee55dec1efe9c67518bf3e27f81b0696075f7153)
* Compile auto tests.Bjørn Erik Nilsen2011-05-1640-23/+42
| | | | Reviewed-by: mstormo
* tests: clean up usage of QT_CONFIG to fix circular dependenciesRohan McGovern2011-05-1637-81/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | With modularized Qt, using QT_CONFIG is dangerous, because the behavior changes depending on the order in which modules are qmake'd. For example, an autotest doing: contains(QT_CONFIG,svg):QT += svg ...will depend on libQtSvg if (and only if) the autotest is qmake'd _after_ qtsvg is qmake'd. This makes the tested functionality unpredictable. Also, if the above example occurs within qtbase, it causes the test to sometimes have a circular dependency: if qtsvg is qmake'd before the test is qmake'd, the test in qtbase depends on qtsvg which depends on qtbase. Tests must avoid functionality tests via QT_CONFIG except where all the tested modules are dependencies of the current module. Usage of QT_CONFIG with qt3support was entirely removed since Qt5 will not retain qt3support. Reviewed-by: Jason McDonald Change-Id: I5a5013b3ec7e1f38fb78864763c9e7586c15e70b
* Temporarily changed autotest behaviour to ignore Qt versionEckhart Koppen2011-05-131-4/+4
| | | | | Version past 5.0.0 was checked, but the test failed to compile in that configuration.
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtbase-stagingEckhart Koppen2011-05-133-3/+3
|\
| * tst_moc: remove QtSvg dependencyOlivier Goffart2011-05-133-3/+3
| | | | | | | | | | The test for no keyword of every header should be done by the tst_CompilerWarnings test
* | Updated version references in autotestsEckhart Koppen2011-05-139-9/+9
|/ | | | Tests now refer to version 5.0.0
* tests: add bug numbers to a few FIXMEsRohan McGovern2011-05-133-4/+3
| | | | Change-Id: Idd01ce127859516dbab10644b97b281cb5218720