summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Stop using SAX classes for reading XML filesSona Kurazyan2019-12-1819-171/+315
| | | | | | | | | | | | | | | The qtxmlpatterns' tests are using SAX classes for parsing XML files. These classes will be deprecated. Replaced QXmlSimpleReader by QDomDocument where applicable. For the test suite handlers inheriting from QXmlDefaultHandler, introduced the XmlParseHelper base class, which drives the parsing loop and allows overriding the methods for handling different XML tokens. Task-number: QTBUG-76177 Change-Id: Ia1a60c898a272906ede459e95ced7ec95d154fde Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add binary compatibility file for qtxmlpatterns 5.14 branchMilla Pohjanheimo2019-12-131-0/+6205
| | | | | | | BC file built against 5.14.0 added. Change-Id: I1d29b035c0efa57424fca81aa6fd09c461281a08 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable auto tests run stand-aloneFriedemann Kleint2019-12-0929-40/+30
| | | | | | | | Change the QtXmlPatternsSDK helper library to be a static library. Fixes: QTBUG-79802 Change-Id: I2f299fbcb73da155643a0b66a13a88745de6d00f Reviewed-by: Matti Paaso <matti.paaso@qt.io>
* Catch invalid simple type that was causing a crashEdward Welbourne2019-12-043-0/+65
| | | | | | | | | | | | | | | Although the type passes a check that's supposed to find all types with a simple type, and appears to be of a simple type, its primitive type is apparently null. This was causing a segmentation fault. Apparently the code fails to correctly set the primitive type of a pattern-type instance of a union type. Document the known limitation by a QEXPECT_FAIL() in the test; I was unable to find where the primitive type should be set. Task-number: QTBUG-77620 Change-Id: I56b95ed815366c508f71b8af03b6f2a653d338c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make a test conditional on its set-up having succeededv5.14.0-beta1v5.14.0-alpha1Edward Welbourne2019-09-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | tst_QXmlQuery::setQueryQUrlFailure()'s sub-test "Query via file:/ that does not have read permissions." depends on the file it tries to read being unreadable. The test's set-up contained a comment explaining why we don't QVERIFY() that it succeeded, but went ahead with adding the test-case regardless. Oddly enough, when the set-up fails to deny permissions, the test fails because the file can be read, so isn't found invalid. Made addition of the test-case conditional on the set-up having succeeded. This made a long line over-long; and it included a duplicated long slab of boring code, used in another test, so extract that piece of code as a lambda and use it twice to save duplication. The tests were also passing raw C-strings to QUrl(), which wants a QString, so give it QStringLiteral() in one case and the existing QString with the relevant name in the other. Fixes: QTBUG-78560 Change-Id: I2e9ca6fe526edfc021cb4978c81fc9204e047c7f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-166-12/+223
|\ | | | | | | Change-Id: If5274213e3d0d91e1b56693dc60cd45240b4dfaa
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-116-12/+223
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Icb9c69298452f55c0816fca75b79c0f041c9d8cf
| | * Actually test XmlListModelMarc Mutz2019-07-016-12/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a typo in 'SUBDIRS', the test was never added to the build. Adding tests/shared/util.* from (current) qtdeclarative, adjusting paths and eradicating Q_FOREACHs, as the module defines QT_NO_FOREACH. Amends 8c6e24329ecd65f364654b1ca2b6a273f0826a8b. Change-Id: Ifacec982e8628c1317b1d7cc5c454c0a2cfafba1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix Q_FOREACH in commented-out codeMarc Mutz2019-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The module is under QT_NO_FOREACH, so don't create a surprise if the code gets uncommented. Yes, this is borderline OCD, indulge me. I like modules that are grep-clean re:foreach... Change-Id: I8211c40d359c308a18fadbc56640861c65cd270f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-221-0/+8
|\ \ \ | |/ / | | | | | | Change-Id: I593c8014b8726aff1b50a2c9c8fef4ac95ad7141
| * | Android: Disable tests that depend on external filesVolker Hilsheimer2019-06-201-0/+8
| |/ | | | | | | | | | | | | | | | | Fixing those tests is cumbersome, and doesn't cover anything that isn't already tested sufficiently on other platforms. Fixes: QTBUG-73643 Change-Id: I800196ec37ee2b364e086202e9a51a5edd541d52 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Tests: Fix warnings about deprecated function qVariantFromValue()Friedemann Kleint2019-05-224-9/+8
|/ | | | | Change-Id: I6351b21813f0680b21405fdeadd7ee072dae703f Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Move xmllistmodel to xmlpatternsFrederik Gladhorn2018-08-2819-0/+1368
| | | | | Change-Id: Ida2a23ae93b8625638397ee7ae10f32b9dcd2043 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-121-0/+5656
|\ | | | | | | Change-Id: I1ca6fd4497d92882d55de77e375ba16d7530189b
| * Add binary compatibility file for 5.11 for QtXmlPatternsMilla Pohjanheimo2018-06-061-0/+5656
| | | | | | | | | | | | | | File for bic test added. Change-Id: Iee7e3abe68eb1132c5d8c316e3095e13886adf1f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-057-13/+8
|\ \ | |/ | | | | Change-Id: Id2b1cebbc86bad2780d964c896b4eb6c8188526f
| * Tests: Fix clang warnings about unused variablesFriedemann Kleint2018-05-025-9/+4
| | | | | | | | | | | | | | | | | | | | tests/auto/qxmlnodemodelindex/tst_qxmlnodemodelindex.cpp:112:warn:unused variable 'copy' [-Wunused-variable] tests/auto/xmlpatternssdk/ResultThreader.h:86:warn:private field 'm_eventLoop' is not used [-Wunused-private-field] tests/auto/xmlpatternssdk/Worker.cpp:114:warn:unused variable 'endB' [-Wunused-variable] tests/auto/xmlpatternssdk/Worker.cpp:112:warn:unused variable 'itB' [-Wunused-variable] Change-Id: Idb1d0f78233665cb64025bda90a325db4562b41a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Tests: Fix Clang warnings about hiding overloaded virtual functionsFriedemann Kleint2018-05-022-4/+4
| | | | | | | | | | | | | | | | | | Rename functions to fix: tests/auto/qsimplexmlnodemodel/tst_qsimplexmlnodemodel.cpp:127:tst_QSimpleXmlNodeModel::stringValue()::TypedModel::root' hides overloaded virtual function [-Woverloaded-virtual] tests/auto/qabstractxmlnodemodel/tst_qabstractxmlnodemodel.cpp:365:'tst_QAbstractXmlNodeModel::typedValue()::TypedModel::root' hides overloaded virtual function [-Woverloaded-virtual] Change-Id: I8fe19ec51126383e5363636e8ae0ea3d3c65d578 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-281-2/+2
|\ \ | |/ | | | | Change-Id: Ic81ebebfb9966bf7d450dacb403242c2f7dafba1
| * Change QSourceLocation::operator!=() to test for inequalityPaul Colby2018-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QSourceLocation] Corrected QSourceLocation::operator!=() to test for non-equality, where prior to this it was incorrectly testing for equality instead. Also, corrected the QSourceLocation::operator!=() documentation which was erroneously referencing an unrelated QXmlName class, and updated the QSourceLocation::operator==() documentation to be consistent with the rest of the class, as well as broader Qt documentation conventions. Change-Id: Ia74f84e965f45fd2da3aa42c9c59eba7014b6edb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-241-3/+0
|\ \ | |/ | | | | Change-Id: I976437c1971d6938ae39f078f6fc77cc65a0559d
| * Unblacklist the test that depended on QDateTime stringificationv5.11.0-beta3Thiago Macieira2018-03-191-3/+0
| | | | | | | | | | | | | | qtbase is up-to-date Change-Id: I41d006aac5bc48529845fffd15102ff5f8322c3e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix tests build when staticSergio Martins2018-02-151-1/+1
|/ | | | | | Change-Id: Ia1dc5bf0d12a676b23d1b502044bf81a16198736 Task-number: QTBUG-66419 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update XML Query baseline after QVariant stringification of QDateTimeThiago Macieira2018-02-042-1/+4
| | | | | | | | | | QVariant (since qtbase commit ab1e50757454b5afda2f6dec52d2eb16a32d4798, reverted but will be brought back) will use milliseconds in the string form, to retain the ability to convert back to the original QDateTime. Task-number: QTBUG-66030 Change-Id: I41d006aac5bc48529845fffd150e62111a19a10e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-161-0/+5656
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6f68767536130d88d48c12e578eb7cd7cd19a40c
| * Add binary compatibility file for QtXmlPatterns for 5.10Milla Pohjanheimo2017-12-141-0/+5656
| | | | | | | | | | | | | | File to test binary compatibility added for 5.10 Change-Id: I31bbf17220c3b36eaf3d6d6cd2626d3fb5791f99 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Fix tst_XmlPatterns::xquerySupport on qemuSami Nurmenniemi2017-12-141-0/+4
|/ | | | | | Task-number: QTBUG-64990 Change-Id: Iad72904ffb134148b7f16a6d42d5b99e788b5df0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix autotest failure in tst_QXmlQuery::relativeBaseURI()v5.10.0-alpha1Eirik Aavitsland2017-08-161-4/+3
| | | | | | | | | | The test (mis)used undocumented QFileInfo behavior, which was changed in qtbase 6504bc6bbc9276fe1a26c1af53c202371f334416. Fix the test to use the proper QFileInfo call. Task-number: QTBUG-62547 Change-Id: Ia95b6a4c471053a9cf8a17afac948771ca1b64c8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update binary compatibility file for Qt5.9.0 for QtXmlPatternsMilla Pohjanheimo2017-08-151-0/+5335
| | | | | | | Binary compatibility file for Qt 5.9.0 updated. Change-Id: Ibdc9836cc9c46e367f49603df76552eee23719f3 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Autotest: adapt to qt_error_string() now returning Win32 messagesThiago Macieira2017-07-211-0/+10
| | | | | | | Instead of Unix "No such file or directory". Change-Id: I84e45059a888497fb55ffffd14d32409773e38fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Pass system environment to processes invoked from tst_xmlpatternsSami Nurmenniemi2017-04-271-1/+1
| | | | | | | | | | This fixes test run with QEMU, which needs QEMU environmental variables passed also to the process invoked from it. Task-number: QTBUG-60266 Change-Id: Icc77f36aa6107043e0845680c2fd4fbf33a7e4e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Drop unused QProcess includeUlf Hermann2017-03-061-1/+0
| | | | | Change-Id: I4f34c217bc997e24b0a13a432cb803d09f6fe314 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix previous fix for trailing 0 handlingKarim Pinter2017-02-084-1/+31
| | | | | | | | | | | The previous fix, 82c5cc6532ac5d0323ecda94b6767e1fdaef2639, wasn't handling properly double conversion to string, this change is rather going through the characters instead. It also adds new test cases. Task-number: QTBUG-58245 Change-Id: I1563d541b0c9fef1254b5fb728308fb2517ed3aa Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Binary compatibility file for qtxmlpatterns (5.8.0)Milla Pohjanheimo2017-02-031-0/+5315
| | | | | | | Added binary compatibility file for qtxmlpatterns Change-Id: I4a879e0211635a5f69dd092d203651186cfd8f09 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* fractionDigits doesn't count the trailing 0s anymoreKarim Pinter2017-01-203-0/+24
| | | | | | | | | fractionDigits were counting also the trailing 0s, which is against the standard https://www.w3.org/TR/xmlschema-2/#rf-fractionDigits Task-number: QTBUG-58245 Change-Id: I9175d4870de82e25c4df2317394ccfba8048fb48 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add feature xml-schemaFriedemann Kleint2016-10-251-2/+2
| | | | | | | Fix build warnings about missing qfeatures. Change-Id: I577b78fcf2037877f15d87006e279e61e4d86945 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-freeMarc Mutz2016-09-205-32/+35
| | | | | | | | In network-settings.h, replaced a few QList of static size with C arrays. Change-Id: Iac32e68f76e3c53fa03b6a2943e1dfb5adbe6fad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-182-0/+10278
|\ | | | | | | Change-Id: I7462160852a7e396cb060efa3b71e3cd56a04b73
| * Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.15.7.1Liang Qi2016-09-171-0/+4998
| |\ | | | | | | | | | Change-Id: If65b4b8c4b328f64ca21ffb289bb9c4b7cb48a9c
| | * BC data files for QtXmlPatterns for Qt 5.6Milla Pohjanheimo2016-09-051-0/+4998
| | | | | | | | | | | | | | | | | | | | | | | | Added binary compatibility data files for tst_bic test Change-Id: I4cda6d9eccad1dec74f4ad35db3e56da01d4d5b1 Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * | BC data files for QtXmlPatterns (5.7)Milla Pohjanheimo2016-09-051-0/+5280
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtXmlPatterns for Qt 5.7. Change-Id: Ia64f5d943c91313182cb0cc6f743440b6bd53602 Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | | tst_XmlPatterns::filterStderr - extend the filterTimur Pocheptsov2016-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent change in network/ssl (namely QSslDiffieHellmanParameters) resulted in 'Unimplemented code.' warning message from default (non-OpenSSL) version (Q_UNIMPLEMENTED there). This makes the test fail. Since Q_UNIMPLEMENTED is not suppressable by logging category trick, extend the already existing filter instead. Change-Id: I6963731dfa7bb74002f9e44e711a6dfb61578cd7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-0/+4
|\ \ \ | |/ / | | | | | | Change-Id: Ie2fcdbd40c4ee41d74250fed025f0363931aefa9
| * | tst_XmlPattern:xquerySupport - silence QSsl's debug outputTimur Pocheptsov2016-05-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of tests expects our own debug output in the processe's output, thus if we have something (even a minor warning) - the test can fail. It was first found on OS X 10.11 with Secure Transport backend, now pops up with OpenSSL back-end also (Windows 7) Change-Id: I19108416048bf89feae2648106b4a4ba8604aa93 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * | tst_XmlPatterns::xquerySupport - silence logging categoryTimur Pocheptsov2016-04-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 10.11 SSL code started producing error messages recently (under investigation) making a test, that expects no error messages to fail. It's a quick and dirty fix. Change-Id: I2339aad551633b378727329d326e610e669b3b2f Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Remove Windows CE.Friedemann Kleint2016-04-1516-133/+8
|/ / | | | | | | | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses. Task-number: QTBUG-51673 Change-Id: Id03f665883a501105e76c2842fb7c0fbf3086687 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | xmlpatternssdk: Fix compilation with MSVC 2015.Friedemann Kleint2016-03-103-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change exported class ExpressionInfo to not inherit QPair<>, use normal member variables for the name/details strings instead. Exporting classes inheriting QPair<> is not possible due to a compiler bug in MSVC 2015. src/corelib/tools/qpair.h(83): error C2065: 'TT1': undeclared identifier src/corelib/tools/qpair.h(83): note: This diagnostic occurred in the compiler generated function 'QPair<QString,QString> &QPair<QString,QString>::operator =(QPair<TT1,TT2> &&) noexcept(<expr>)' src/corelib/tools/qpair.h(83): error C2923: 'std::is_nothrow_assignable': 'TT1' is not a valid template type argument for parameter '_From' Task-number: QTBUG-49658 Change-Id: Ib2c27a4c2b0aae28b4de6086c8ddc0220e205075 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-21126-2142/+1512
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I1ddbce303f8c450d5bf1b553ab53843a83046bb5 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-105-51/+83
|\ \ | |/ | | | | Change-Id: Iaf57c1b0beffdceb3f0533aa77ba536ec4c373a9
| * Change uses of toAscii to toLatin1v5.6.0-beta1Liang Qi2015-12-101-1/+1
| | | | | | | | | | | | | | This ammends e19bbdf8. Change-Id: Idebb29cdbb6fb30ac446701ebc415a7944f48421 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>