summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* testlib: Add selftests for -v1 and -v2 command-line switches.Jason McDonald2012-03-0213-5/+1060
| | | | | | | | | | | | | | | These tests don't have their own source code but rather reuse the counting selftest with additional command-line options. Note that currently the -v1 switch only changes the plain text output, and the expected xml output is identical to that of the counting test. This may change in the future however. This commit also restores a couple of lists to alphabetical order, where the findtestdata selftest was not sorted into the list correctly. Change-Id: Ie38e255f8029157b34162b3864b5fa66e137d74a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Unset _NET_WM_USER_TIME_WINDOW before destroying the windowJan Arne Petersen2012-03-011-0/+13
| | | | | | | | | | Otherwise metacity was crashing when a QWindow was destroyed immediately after being activated, because metacity was trying to select events (XSelectInput) for the already destroyed m_netWmUserTimeWindow. Task-number: QTBUG-24492 Change-Id: Iedbe7bdd6b26110ca8bec6f33525209ae551ffd5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix tst_qregexp with QStringBuilderOlivier Goffart2012-03-011-133/+133
| | | | | | Change-Id: I1ac2a5c9ea5657ad2916465b77271e3d53c67cde Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove ARMFPA support and Q_DOUBLE_FORMAT detectionBradley T. Hughes2012-03-013-24/+1
| | | | | | | | | | | | | | | | | Remove the -armfpa option the config.tests/unix/doubleformat* detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT has been removed as well. Rationale: ARM FPA with GCC does not work with EABI. Qt currently does not support compiling without EABI, making ARM FPA an impossibility. It is unknown whether other compilers provide ARM FPA support with EABI. Support for ARM FPA can be re-added in the future should the need arise, but since ARM VFP is available for ARMv5 and up, we should encourage implementors to instead use soft-floats or VFP. Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Cocoa: Implement QPlatformTheme:palette()Morten Johan Sorvig2012-03-011-2/+3
| | | | | | | | Causes a new test failure in QGraphicsProxyWidget::updateAndDelete, expand the EXPECT_FAIL to cover that one as well. Change-Id: If9da757206445d17510c4fac82a559de7b8c0563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use QSystemError for QDnsLookup windows backendShane Kearns2012-03-011-1/+1
| | | | | | | | | | | The OS provides the error string in this case. This gives more information to the developer seeing a generic error. Change-Id: Ia03642982f3513ee5a8a9fa98d918e948f8d97a5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* qmake-test: Fix jom/nmake handling on Windows.Friedemann Kleint2012-03-011-2/+23
| | | | | | | | | The test fails if MAKEFLAGS is set up for jom since the test always uses nmake. Remove MAKEFLAGS from the process environment. Change-Id: Idaed3cc964832b83c282a59fc5257572c520b882 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Skip the network SSL test on Windows.Friedemann Kleint2012-03-011-1/+1
| | | | | | | | For SSL, this would require an OpenSSL library to be installed. Change-Id: I2a320e7faf40ef925c90dbe539f912e4a8fc13fc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Changed qchar unittest to check return from QFINDTESTDATAKurt Korbatits2012-03-011-1/+3
| | | | | | | | - Changed qchar unittest to check string QFINDTESTDATA returns is not empty. Change-Id: Idb3997aaa5d5220272915c1e2538175205b3d6e8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed qlocale unittest to install subprogram syslocaleapp correctlyKurt Korbatits2012-03-012-4/+3
| | | | | | | | - It was trying to install syslocaleapp sub program as TESTDATA instead of an application. Change-Id: I2117d11335bc2fd37a8ccc9a03b0337382f0177f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qdir unittest remove() to check actual file removedKurt Korbatits2012-03-011-1/+2
| | | | | | | - Changed remove() test to check the file just removed is gone. Change-Id: I0b6c176e624134402b5547866064f436ce063f16 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Changed qlogging unittest to install subprogramKurt Korbatits2012-03-011-0/+3
| | | | | | | - Added install of app sub program so it works from install directory Change-Id: Ia83643519752a3cbb59d6da2aed132d683a94bee Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed qdir unittest rename() test to skip if run as rootKurt Korbatits2012-03-011-0/+6
| | | | | | | - subtest not valid if run as root so added a check and skip Change-Id: Iae993e20f272f9303a75062ef00d22b49df5e84a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QRegExp: fix \i \I \c \C \p \P escape sequencesGiuseppe D'Angelo2012-03-011-0/+24
| | | | | | | | | | | | | | Those escape sequences have a special meaning in the XML Schema 1.1 regular expressions, but not in Perl-compatible ones. An escape sequence that has no special meaning should match the escaped character itself; this patch fixes QRegExp's behaviour in that regard (previously, it added a character class matching nothing). Change-Id: I983f923baa7c2ec19938b96353f3a205e6c06d58 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows - fix getsockopt calls for narrower than int optionsShane Kearns2012-03-011-0/+36
| | | | | | | | | | | | | | | | | | | | | | Windows unhelpfully writes to only one byte of the output buffer when getsockopt is called for a boolean option. Therefore we have to zero initialise the int rather than initialising to -1 as was done before. This in general only works for little endian architecture, because the word would look like 0x01000000 on big endian. So I have added some compile time asserts in the assumption that windows is always little endian. This is ok for comparisons with 0/false, but not comparisons with true or nonzero values. In the case of IPV6_V6ONLY, it is documented as DWORD (unsigned int) but on some windows versions it is returned as a boolean triggering the warning. I removed the warning, as the conversion to int works on both LE and BE since it is only compared with zero. Task-number: QTBUG-23488 Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* Remove qhash_faster.Robin Burchell2012-02-293-73/+0
| | | | | | | | It's not faster under _any_ metric than the new algorithm, and it loses a lot of spread which is a bad thing. Change-Id: Ic87258f1c887822ffea1cb1517355564fabc3c26 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Copy Qt 4's QString hash algorithm.Robin Burchell2012-02-293-4/+32
| | | | | | | | | | We must do this the same way we do all other hash algorithms for fair comparison, as otherwise, the call to the PLT unfairly penalises QHash<QString>'s results, as it's in a different shared object. Change-Id: I69c891f5a97dcccdfcfbdbf32796f86242a42963 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move data generation to initTestCase() method and store the results.Robin Burchell2012-02-291-72/+58
| | | | | | | | | Per the comments on Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e, having Q_ASSERT was not a good idea, and data functions can't really handle QVERIFY/QCOMPARE/etc, so do this in initTestCase instead. Change-Id: I19e61dec7fe415bb1fa0f53a2920d99b8c7c8ea7 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add test data for string forms of numbers.Robin Burchell2012-02-291-0/+12
| | | | | | | Similar to the UUID benchmark, but won't have any non-numerical characters. Change-Id: I7487c97cab96fd53c180fe12061e7be3ca96e883 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add a test using lots of similar strings.Robin Burchell2012-02-291-0/+36
| | | | | | | | This attempts to emulate a dictionary usecase of sorts, done in code to avoid bloating the git repository by adding an actual word list. Change-Id: I878bc4af8877ba780ee699932f240c0d9c8ff12c Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QFileSystemModel autotest fixesMiikka Heikkinen2012-02-292-59/+33
| | | | | | | | | | | | | For some reason, hiding files via executing "attrib +h filename" process didn't work realiably, so changed the file hiding to be done via Windows native API. Also changed the test to use QTemporaryDir to simplify temporary directory handling a bit. Task-number: QTBUG-24291 Change-Id: I4f02b16e2f9105bcf5e6c5bf136f55434a26e2f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* network cookies: check "example.com" != "example.com."Shane Kearns2012-02-291-0/+12
| | | | | | | | Only test code change, we already have the correct behaviour Task-number: QTBUG-20001 Change-Id: I2296f405f47f9c8d15796e69f9d1854063e38d6a Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove internal class QVolatileImage.Laszlo Agocs2012-02-293-213/+0
| | | | | | | | | | | | | | This made sense only for Symbian where there was a special CFbsBitmap-based backend present and it was used from the Symbian-specific VG and GL pixmap implementations. The generic version is merely a useless wrapper over QImage and is not in use anywhere in the codebase. Change-Id: I1dabe22dfb8cbbc35dce8e22703a3aff810fb5f9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix tests of QMimeDatabase.Friedemann Kleint2012-02-297-65/+121
| | | | | | | | | | | | | | | - Use temporary directories to avoid instabilities due to remains of previous failed tests and locked directories. - Replace SRCDIR by QFINDTESTDATA(), reference only the freedesktop.org.xml contained in the Qt source tree by $$QT.corelib.sources. - Improve some error messages, test suite instructions for Windows. Change-Id: Idee8e3767ef0a8299df3bdaaac20334164878db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: David Faure <faure@kde.org>
* Skip test tst_QTextScriptEngine::thaiWithZWJ on Windows.Friedemann Kleint2012-02-291-0/+3
| | | | | | Change-Id: I9286ae8b1200b2d6638d1257a872450a9886fce0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix build of QImageReader tests with QT_USE_QSTRINGBUILDER.Stephen Kelly2012-02-291-1/+1
| | | | | Change-Id: I789d99d0741bc178d2d7fd82558edc684eb6daf8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix build of QWizard tests with QT_USE_QSTRINGBUILDERStephen Kelly2012-02-291-2/+2
| | | | | Change-Id: Id276cdb9b84c61bf75a5bde149142f39f52f563e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove unused selftest data file.Jason McDonald2012-02-292-7/+0
| | | | | | | | | The private git history shows that the test program associated with this data file was missing from the original commit and was never subsequently added. Change-Id: I3401724ac04168158a48eb06436db83d3557711f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Skip QLocale test on Windows, improve process handling.Friedemann Kleint2012-02-283-34/+92
| | | | | | | | | | | | | - Skip the failing windowsDefaultLocale() test. - Improve the handling of the subprocess, locate the binary in initTestCase instead of repeatedly searching it. - Make all applications console/non-app bundles. Task-number: QTBUG-24543 Change-Id: I79dfaa3320cd5698f02e74a3fe53477d4a79d4fb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QLibrary autotest for WindowsMiikka Heikkinen2012-02-283-4/+17
| | | | | | | | | | | | The libraries were built into wrong directory in Windows. Fixed it so that the libraries are built into debug and release directories like the test executable. Also fixed QMAKE_CLEAN statement, which was using incorrect separator. Task-number: QTBUG-24151 Change-Id: Iade656af5f83ef2b79c2b9c4177df4a16b2f6821 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* moc: Only generate IndexOfMethod for signals.Olivier Goffart2012-02-281-4/+5
| | | | | | | | | | | | | | | | | | | | moc is currently generating code to convert from a pointer to member function of a slot or signal to its index. The idea was that it could be usefull for slots to have the new syntax do the same as the old one (connecting signal index to slot index). But in practice, the new syntax do not use the IndexOfMethod for slots. Also, it does not work for all the slots (no Q_PRIVATE_SLOT, no static slots) So since it is not used, and that it would take room in the binaries to generate all the code to get the index of slots, we remove it. If ever we need it, we can still add it later. Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* QComboBox: Use platform theme hint to determine popup geometry.Friedemann Kleint2012-02-281-12/+10
| | | | | Change-Id: I1f81be1394455715c5dfcd2d426758c4c7cd91fc Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* restore previously non-working disabled testMark Brand2012-02-281-2/+1
| | | | | Change-Id: I419863a681f7be96cb855a274c68eaea25efebcb Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* testlib: Improve the silent logging modeJason McDonald2012-02-286-0/+124
| | | | | | | | | | | | | | Previously the silent logging mode suppressed passes, skips and internal testlib info messages, but did not suppress debugging output, making it hard to see the fails in a noisy test. This commit changes silent mode so that it suppresses all output except test failures and fatal errors, making silent mode truly useful for seeing just the important test output. This commit also adds a selftest to verify the behaviour of silent mode. Change-Id: I75420aead03682306210746a87e2a3b608b58fc6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add SHA-224, SHA-256, SHA-384, and SHA-512 support to QCryptographicHashBradley T. Hughes2012-02-271-0/+16
| | | | | | | | | | | This adds Sha224, Sha256, Sha384, and Sha512 enum values to QCryptographicHash::Algorithm. The implementation comes from RFC 6234, http://tools.ietf.org/html/rfc6234, which is added to src/3rdparty/rfc6234. Only the headers and SHA-2 code is included in src/3rdparty/rfc6234 (the SHA1, HMAC, and HKDF code is not included). Change-Id: I85139fd118291f15efc22899a5ddd1cc83810cfb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* remove useless init() functionOswald Buddenhagen2012-02-271-6/+0
| | | | | | | | it did the same cleanup() did, and they are always called consecutively anyway (except at start and end where it does not matter). Change-Id: I4c82024d19d6c670f1f4037d43147a15680614ae Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move resetEnvironment() call to cleanup()Oswald Buddenhagen2012-02-271-1/+1
| | | | | | | we want to call it even if the test fails Change-Id: Ie8f3f9d2df5d52990d6b9f9a632e49826278175a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make qmake test suite a tad more verbose on failureOswald Buddenhagen2012-02-273-13/+19
| | | | | | | automatically dump the collected output on non-expected return code Change-Id: Ifda7287869f329c5a6714e6f21aa9c3991e9ee4e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* TestCompiler: split commands from argumentsOswald Buddenhagen2012-02-273-11/+27
| | | | | | | | | this allows us to temporarily set some extra args without (incorrectly) instantiating a second TestCompiler (and on the way relying on $PATH for finding qmake). Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't rely on $PATH for finding rccOswald Buddenhagen2012-02-271-1/+3
| | | | | Change-Id: I7e6ffad6d84cca0b548920b3e620375fb5e314e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix tst_qmenu.Debao Zhang2012-02-271-1/+0
| | | | | | | | | Clear away Q_WS_WIN/Q_WS_X11 from QMenu. Using the hint returned by the QPlatformTheme. Task-number: QTBUG-24325 Change-Id: Iaa4da26c74273d7cfc1fbec6519c52d09e10f7bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QClipboard: Fix autotest failsDebao Zhang2012-02-271-24/+20
| | | | | | | | | | | | | | | tst_qclipboard.cpp still has Q_WS_WIN which must be clear away. After clean up, auto test will fail under windows: When setMimeData() is called, dataChanged() signal will be emited twice. The solution for QTBUG-24184 has partially solved the problem, but it still there. Make sure emitChanged() only called by QPlatformClipboard will give our more control for this. Task-number: QTBUG-24484 Change-Id: I23566c6d3b32828b6865234c311af3635fe9e299 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QThreadstorage test.Friedemann Kleint2012-02-277-25/+62
| | | | | | | | | | | | - Create subdirectories containing profiles to avoid problems with -fast. - Use QFINDTESTDATA to locate binary. - Make it a console application, no Mac-bundle. - Add error messages to the test, give it a longer time-out and ensure sub-process is killed if it hangs. Change-Id: Ibc177b786c4bc8fdbc068a8c45f4801a41c9f660 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix inconsistent auto test executable namesDavid Faure2012-02-273-1/+3
| | | | | | Change-Id: I3b6b5b37e32be25d1b9933395c43f6d5aa5b8810 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QRegExp: fix crashGiuseppe D'Angelo2012-02-271-0/+29
| | | | | | | | | | | | Fixes a crash when invoking various QRegExp methods on an object *before* doing any match. For instance fixes: QRegExp re; re.matchedLength(); // crash Task-number: QTBUG-23352 Change-Id: I9c239ff790a139c7820ef1aeced89d31320ae6b0 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reduce QtCore lib binary size by around ~3KB, by removing template codeJędrzej Nowacki2012-02-271-3/+1
| | | | | | | | | | | | | | | Reusing a template is much better then creating a new one, even if it should inline the same code. For some reason replacing T* by void* force gcc to remove a few bytes per template instantiation too, it is not really significant, but it alows us to simplify the code. Benchmarks don't show any regressions. Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix selftests while using QStringBuilderOlivier Goffart2012-02-271-1/+1
| | | | | Change-Id: I6dcd830b96023765447c9683fd95209d4312fb1b Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Cleanup usage of QVariant::Type.Jędrzej Nowacki2012-02-271-1/+1
| | | | | | | | | QVariant::Type is marked as obsolete. It is not possible to get rid of it completely, in a source compatible way, but at least we can remove it safely from a method arguments list. Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Skip unstable qlineedit autotest on Ubuntu 11.10.Toby Tomkins2012-02-272-0/+6
| | | | | | | | Task-number: QTBUG-24518 Change-Id: Ia271a820613c1f8a885779eddd20e261716afc6d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qfiledialog2: Skip test that is passing on CI and failing otherwise.Toby Tomkins2012-02-271-3/+3
| | | | | | | | Task-number: QTBUG-23602 Change-Id: Id5dfb85956048c60849d865161212b0764e8f250 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>