From 7e1dacc27a8a9b10c51d42f816083e77e7ad0690 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 24 Apr 2020 16:37:42 +0200 Subject: Port qtbase/tests/auto/corelib/text tests to CMake Task-number: QTBUG-78220 Change-Id: I497da6ed489854bdee5a1ead9a3f34118c78d001 Reviewed-by: Alexandru Croitor --- tests/auto/corelib/text/.prev_CMakeLists.txt | 22 ++++++++++++ tests/auto/corelib/text/CMakeLists.txt | 22 ++++++------ tests/auto/corelib/text/qbytearray/CMakeLists.txt | 40 ++++++++++++++++++++++ .../corelib/text/qbytearraymatcher/CMakeLists.txt | 13 +++++++ tests/auto/corelib/text/qchar/CMakeLists.txt | 33 ++++++++++++++++++ tests/auto/corelib/text/qcollator/CMakeLists.txt | 14 ++++++++ .../auto/corelib/text/qlatin1string/CMakeLists.txt | 16 +++++++++ tests/auto/corelib/text/qlocale/CMakeLists.txt | 6 ++++ .../text/qlocale/syslocaleapp/CMakeLists.txt | 11 ++++++ .../auto/corelib/text/qlocale/test/CMakeLists.txt | 29 ++++++++++++++++ tests/auto/corelib/text/qstring/CMakeLists.txt | 29 ++++++++++++++++ .../corelib/text/qstringapisymmetry/CMakeLists.txt | 13 +++++++ .../corelib/text/qstringbuilder/CMakeLists.txt | 6 ++++ tests/auto/corelib/text/qstringview/CMakeLists.txt | 13 +++++++ .../text/qtextboundaryfinder/CMakeLists.txt | 34 ++++++++++++++++++ 15 files changed, 290 insertions(+), 11 deletions(-) create mode 100644 tests/auto/corelib/text/.prev_CMakeLists.txt create mode 100644 tests/auto/corelib/text/qbytearray/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qchar/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qcollator/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qlatin1string/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qlocale/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qlocale/test/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qstring/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qstringbuilder/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qstringview/CMakeLists.txt create mode 100644 tests/auto/corelib/text/qtextboundaryfinder/CMakeLists.txt (limited to 'tests/auto') diff --git a/tests/auto/corelib/text/.prev_CMakeLists.txt b/tests/auto/corelib/text/.prev_CMakeLists.txt new file mode 100644 index 0000000000..e23de92c8c --- /dev/null +++ b/tests/auto/corelib/text/.prev_CMakeLists.txt @@ -0,0 +1,22 @@ +# Generated from text.pro. + +add_subdirectory(qbytearray) +add_subdirectory(qbytearraylist) +add_subdirectory(qbytearraymatcher) +add_subdirectory(qbytedatabuffer) +add_subdirectory(qchar) +add_subdirectory(qcollator) +add_subdirectory(qlatin1string) +add_subdirectory(qlocale) +add_subdirectory(qregexp) +add_subdirectory(qregularexpression) +add_subdirectory(qstring) +add_subdirectory(qstring_no_cast_from_bytearray) +add_subdirectory(qstringapisymmetry) +add_subdirectory(qstringbuilder) +add_subdirectory(qstringiterator) +add_subdirectory(qstringlist) +add_subdirectory(qstringmatcher) +add_subdirectory(qstringref) +add_subdirectory(qstringview) +add_subdirectory(qtextboundaryfinder) diff --git a/tests/auto/corelib/text/CMakeLists.txt b/tests/auto/corelib/text/CMakeLists.txt index dd51385aa6..e23de92c8c 100644 --- a/tests/auto/corelib/text/CMakeLists.txt +++ b/tests/auto/corelib/text/CMakeLists.txt @@ -1,22 +1,22 @@ # Generated from text.pro. -# add_subdirectory(qbytearray) # special case not ported +add_subdirectory(qbytearray) add_subdirectory(qbytearraylist) -# add_subdirectory(qbytearraymatcher) # special case not ported +add_subdirectory(qbytearraymatcher) add_subdirectory(qbytedatabuffer) -# add_subdirectory(qchar) # special case not ported -# add_subdirectory(qcollator) # special case not ported -# add_subdirectory(qlatin1string) # special case not ported -# add_subdirectory(qlocale) # special case not ported +add_subdirectory(qchar) +add_subdirectory(qcollator) +add_subdirectory(qlatin1string) +add_subdirectory(qlocale) add_subdirectory(qregexp) add_subdirectory(qregularexpression) -# add_subdirectory(qstring) # special case not ported +add_subdirectory(qstring) add_subdirectory(qstring_no_cast_from_bytearray) -# add_subdirectory(qstringapisymmetry) # special case not ported -# add_subdirectory(qstringbuilder) # special case not ported +add_subdirectory(qstringapisymmetry) +add_subdirectory(qstringbuilder) add_subdirectory(qstringiterator) add_subdirectory(qstringlist) add_subdirectory(qstringmatcher) add_subdirectory(qstringref) -# add_subdirectory(qstringview) # special case not ported -# add_subdirectory(qtextboundaryfinder) # special case not ported +add_subdirectory(qstringview) +add_subdirectory(qtextboundaryfinder) diff --git a/tests/auto/corelib/text/qbytearray/CMakeLists.txt b/tests/auto/corelib/text/qbytearray/CMakeLists.txt new file mode 100644 index 0000000000..f2fd281f90 --- /dev/null +++ b/tests/auto/corelib/text/qbytearray/CMakeLists.txt @@ -0,0 +1,40 @@ +# Generated from qbytearray.pro. + +##################################################################### +## tst_qbytearray Test: +##################################################################### + +# Collect test data +list(APPEND test_data "rfc3252.txt") + +qt_add_test(tst_qbytearray + SOURCES + tst_qbytearray.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +qt_extend_target(tst_qbytearray CONDITION APPLE + SOURCES + tst_qbytearray_mac.mm + PUBLIC_LIBRARIES + ${FWFoundation} +) + +if(ANDROID AND NOT ANDROID_EMBEDDED) + # Resources: + set(android_testdata_resource_files + "rfc3252.txt" + ) + + qt_add_resource(tst_qbytearray "android_testdata" + PREFIX + "/" + FILES + ${android_testdata_resource_files} + ) +endif() diff --git a/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt new file mode 100644 index 0000000000..75da499064 --- /dev/null +++ b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qbytearraymatcher.pro. + +##################################################################### +## tst_qbytearraymatcher Test: +##################################################################### + +qt_add_test(tst_qbytearraymatcher + SOURCES + tst_qbytearraymatcher.cpp +) + +## Scopes: +##################################################################### diff --git a/tests/auto/corelib/text/qchar/CMakeLists.txt b/tests/auto/corelib/text/qchar/CMakeLists.txt new file mode 100644 index 0000000000..ae4bc1f23d --- /dev/null +++ b/tests/auto/corelib/text/qchar/CMakeLists.txt @@ -0,0 +1,33 @@ +# Generated from qchar.pro. + +##################################################################### +## tst_qchar Test: +##################################################################### + +# Collect test data +list(APPEND test_data "data/NormalizationTest.txt") + +qt_add_test(tst_qchar + SOURCES + tst_qchar.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +if(ANDROID AND NOT ANDROID_EMBEDDED) + # Resources: + set(testdata_resource_files + "data/NormalizationTest.txt" + ) + + qt_add_resource(tst_qchar "testdata" + PREFIX + "/" + FILES + ${testdata_resource_files} + ) +endif() diff --git a/tests/auto/corelib/text/qcollator/CMakeLists.txt b/tests/auto/corelib/text/qcollator/CMakeLists.txt new file mode 100644 index 0000000000..105a65310e --- /dev/null +++ b/tests/auto/corelib/text/qcollator/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qcollator.pro. + +##################################################################### +## tst_qcollator Test: +##################################################################### + +qt_add_test(tst_qcollator + SOURCES + tst_qcollator.cpp + DEFINES + QT_NO_CAST_TO_ASCII + PUBLIC_LIBRARIES + Qt::CorePrivate +) diff --git a/tests/auto/corelib/text/qlatin1string/CMakeLists.txt b/tests/auto/corelib/text/qlatin1string/CMakeLists.txt new file mode 100644 index 0000000000..9c929b3893 --- /dev/null +++ b/tests/auto/corelib/text/qlatin1string/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qlatin1string.pro. + +##################################################################### +## tst_qlatin1string Test: +##################################################################### + +qt_add_test(tst_qlatin1string + SOURCES + tst_qlatin1string.cpp + DEFINES + QT_DISABLE_DEPRECATED_BEFORE=0 + QT_NO_CAST_TO_ASCII +) + +## Scopes: +##################################################################### diff --git a/tests/auto/corelib/text/qlocale/CMakeLists.txt b/tests/auto/corelib/text/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..0f5a98ccce --- /dev/null +++ b/tests/auto/corelib/text/qlocale/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from qlocale.pro. + +add_subdirectory(test) +if(NOT WINRT) + add_subdirectory(syslocaleapp) +endif() diff --git a/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt b/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt new file mode 100644 index 0000000000..68c6c5e3b6 --- /dev/null +++ b/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt @@ -0,0 +1,11 @@ +# Generated from syslocaleapp.pro. + +##################################################################### +## syslocaleapp Binary: +##################################################################### + +qt_add_executable(syslocaleapp + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + syslocaleapp.cpp +) diff --git a/tests/auto/corelib/text/qlocale/test/CMakeLists.txt b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt new file mode 100644 index 0000000000..19d454d530 --- /dev/null +++ b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from test.pro. + +##################################################################### +## tst_qlocale Test: +##################################################################### + +qt_add_test(tst_qlocale + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../tst_qlocale.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate +) + +## Scopes: +##################################################################### + +qt_extend_target(tst_qlocale CONDITION embedded + PUBLIC_LIBRARIES + Qt::Gui +) + +qt_extend_target(tst_qlocale CONDITION NOT QT_FEATURE_doubleconversion AND NOT QT_FEATURE_system_doubleconversion + DEFINES + QT_NO_DOUBLECONVERSION +) + +#### Keys ignored in scope 7:.:.:test.pro:NOT ANDROID AND NOT WINRT: +# TEST_HELPER_INSTALLS = "../syslocaleapp/syslocaleapp" diff --git a/tests/auto/corelib/text/qstring/CMakeLists.txt b/tests/auto/corelib/text/qstring/CMakeLists.txt new file mode 100644 index 0000000000..8451e0fcb4 --- /dev/null +++ b/tests/auto/corelib/text/qstring/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from qstring.pro. + +##################################################################### +## tst_qstring Test: +##################################################################### + +qt_add_test(tst_qstring + SOURCES + tst_qstring.cpp + DEFINES + QT_DISABLE_DEPRECATED_BEFORE=0 + PUBLIC_LIBRARIES + Qt::CorePrivate +) + +## Scopes: +##################################################################### + +qt_extend_target(tst_qstring CONDITION NOT QT_FEATURE_doubleconversion AND NOT QT_FEATURE_system_doubleconversion + DEFINES + QT_NO_DOUBLECONVERSION +) + +qt_extend_target(tst_qstring CONDITION APPLE + SOURCES + tst_qstring_mac.mm + PUBLIC_LIBRARIES + ${FWFoundation} +) diff --git a/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt b/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt new file mode 100644 index 0000000000..48042fc32e --- /dev/null +++ b/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qstringapisymmetry.pro. + +##################################################################### +## tst_qstringapisymmetry Test: +##################################################################### + +qt_add_test(tst_qstringapisymmetry + SOURCES + tst_qstringapisymmetry.cpp +) + +## Scopes: +##################################################################### diff --git a/tests/auto/corelib/text/qstringbuilder/CMakeLists.txt b/tests/auto/corelib/text/qstringbuilder/CMakeLists.txt new file mode 100644 index 0000000000..20c980f0ad --- /dev/null +++ b/tests/auto/corelib/text/qstringbuilder/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from qstringbuilder.pro. + +add_subdirectory(qstringbuilder1) +add_subdirectory(qstringbuilder2) +add_subdirectory(qstringbuilder3) +add_subdirectory(qstringbuilder4) diff --git a/tests/auto/corelib/text/qstringview/CMakeLists.txt b/tests/auto/corelib/text/qstringview/CMakeLists.txt new file mode 100644 index 0000000000..aefcf6a1ee --- /dev/null +++ b/tests/auto/corelib/text/qstringview/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qstringview.pro. + +##################################################################### +## tst_qstringview Test: +##################################################################### + +qt_add_test(tst_qstringview + SOURCES + tst_qstringview.cpp +) + +## Scopes: +##################################################################### diff --git a/tests/auto/corelib/text/qtextboundaryfinder/CMakeLists.txt b/tests/auto/corelib/text/qtextboundaryfinder/CMakeLists.txt new file mode 100644 index 0000000000..93d858a96a --- /dev/null +++ b/tests/auto/corelib/text/qtextboundaryfinder/CMakeLists.txt @@ -0,0 +1,34 @@ +# Generated from qtextboundaryfinder.pro. + +##################################################################### +## tst_qtextboundaryfinder Test: +##################################################################### + +# Collect test data +list(APPEND test_data "data") + +qt_add_test(tst_qtextboundaryfinder + SOURCES + tst_qtextboundaryfinder.cpp + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +if(ANDROID AND NOT ANDROID_EMBEDDED) + # Resources: + set(testdata_resource_files + "data/GraphemeBreakTest.txt" + "data/LineBreakTest.txt" + "data/SentenceBreakTest.txt" + "data/WordBreakTest.txt" + ) + + qt_add_resource(tst_qtextboundaryfinder "testdata" + PREFIX + "/" + FILES + ${testdata_resource_files} + ) +endif() -- cgit v1.2.3