summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* QString: use comparison helper macros - trivial changes [1/3]Ivan Solovev2024-03-021-0/+1
| | | | | | | | | | | | | Replace the hidden friend relational operators with hidden friend helper functions and comparison helper macros. Provide more unit-tests for the updated types. This enables operator<=> in C++20 builds. Task-number: QTBUG-117661 Change-Id: I17329cd6422f272a435fc1da241203581eef7fbb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CI: Enable tests under corelib/text for Wasm platformPiotr Wierciński2023-07-101-0/+1
| | | | | | | | | | We are gradually enabling more tests for WebAssembly platform for better test coverage. Long linking time is no longer an issue due to test batching. Change-Id: I7ee9f877ecda726bc23d8dd2507c616bb381ebc1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* CMake: Make corelib tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I28b6d3815c5f43d2c33ea65764f6f3f8f129eaf3 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: add a tst_QString variant with QT_NO_CAST_FROM_ASCIIAhmad Samir2023-04-291-1/+7
| | | | | | | | | | | | | | Now the tst_qstring is compiled three times: - with QT_NO_CAST_FROM_ASCII defined - with QT_RESTRICTED_CAST_FROM_ASCII defined - with neither of the above defined so as to cover more code paths. Pick-to: 6.5 Task-number: QTBUG-109228 Change-Id: I65eca0f6f6aea66fed6eeda1eb77a50a97210807 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QString<->emscripten::val conversion functionsMikolaj Boc2023-01-131-0/+3
| | | | | | | | Following the QRect, add functions converting the QString to native emscripten::val and back: fromJsString, toJsString Change-Id: I2d0625ede3bbf7249e2e91b8de298b5b91df8ba2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, tooMarc Mutz2022-12-221-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtBase didn't contain any checks for QT_RESTRICTED_CAST_FROM_ASCII, so a recent addition to the QString::append/insert/prepend overload set made calls with C string literal arguments ambiguous without the CI noticing. We had a similar problem with QString::multiArg. To increase test coverage, we now run tst_qstring two times: - without any define - with QT_RESTRICTED_CAST_FROM_ASCII (lots of changes necessary) Most removals are expected, because they disable tests that check the implicit conversions from QByteArray and const char*, but the relational operators with QLatin1String objects might warrant fixing. In some places, when the conversion wasn't the functionality under test, replaced C string literals or QByteArrays with QLatin1String. We should also test with QT_NO_CAST_FROM_ASCII, but that's even larger surgery. QString doesn't have a ctor from std::nullptr_t, so QString s = nullptr; doesn't compile in C++17 mode, but does in C++20 mode, due to the const char8_t* ctor. Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I0c5a31719a4b8dd585dd748e0ca0d99964866064 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_qstring: port away from deprecated APIsIvan Solovev2022-08-271-2/+0
| | | | | | | | | | | | | | * QVariant::Type -> QMetaType::Type. * Guard the test for deprecated fromUtf16(const ushort *) overload with QT_DEPRECATED_SINCE check. * Use fromUtf16(const char16_t *) overload in other places. As a drive-by: fix formatting in the affected lines. Task-number: QTBUG-104858 Change-Id: I9fa3a935bca36e97f934f673e2fc07b451c72872 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TOIvan Solovev2022-08-191-1/+1
| | | | | | | | | | | | | | The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Task-number: QTBUG-104944 Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-2/+2
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-3/+3
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port qtbase/tests/auto/corelib/text tests to CMakeSona Kurazyan2020-04-271-0/+29
Task-number: QTBUG-78220 Change-Id: I497da6ed489854bdee5a1ead9a3f34118c78d001 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>