diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/auto/qml/qmldesigner/coretests/coretests.pro | 1 | ||||
-rw-r--r-- | tests/auto/qml/qmldesigner/testconnectionmanager.cpp | 14 | ||||
-rw-r--r-- | tests/system/suite_tools/tst_codepasting/test.py | 2 | ||||
-rw-r--r-- | tests/unit/unittest/CMakeLists.txt | 27 | ||||
-rw-r--r-- | tests/unit/unittest/unittest.qbs | 13 |
6 files changed, 25 insertions, 36 deletions
diff --git a/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt b/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt index 391c90862fa..d52f1c98d04 100644 --- a/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt +++ b/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt @@ -22,4 +22,6 @@ add_qtc_plugin(testplugin ) # The empty string gets removed if I put it above -set_target_properties(testplugin PROPERTIES PREFIX "") +if (TARGET testplugin) + set_target_properties(testplugin PROPERTIES PREFIX "") +endif() diff --git a/tests/auto/qml/qmldesigner/coretests/coretests.pro b/tests/auto/qml/qmldesigner/coretests/coretests.pro index c179025da59..e94cddbd7d6 100644 --- a/tests/auto/qml/qmldesigner/coretests/coretests.pro +++ b/tests/auto/qml/qmldesigner/coretests/coretests.pro @@ -52,6 +52,7 @@ INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/propertyedit INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/debugview INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins/qmldesigner/components/edit3d INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/3rdparty +INCLUDEPATH *= $$IDE_SOURCE_TREE/src/libs/sqlite include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/designercore/designercore-lib.pri) diff --git a/tests/auto/qml/qmldesigner/testconnectionmanager.cpp b/tests/auto/qml/qmldesigner/testconnectionmanager.cpp index f637fb1f1ab..03a6d43346c 100644 --- a/tests/auto/qml/qmldesigner/testconnectionmanager.cpp +++ b/tests/auto/qml/qmldesigner/testconnectionmanager.cpp @@ -32,26 +32,26 @@ namespace QmlDesigner { TestConnectionManager::TestConnectionManager() { - m_connections.emplace_back("Editor", "editormode"); + connections().emplace_back("Editor", "editormode"); } void TestConnectionManager::writeCommand(const QVariant &command) { - TestConnectionManager::writeCommand(command); + ConnectionManager::writeCommand(command); - m_writeCommandCounter++; + writeCommandCounter()++; static int synchronizeId = 0; synchronizeId++; SynchronizeCommand synchronizeCommand(synchronizeId); - QLocalSocket *socket = m_connections.front().socket.get(); + QLocalSocket *socket = connections().front().socket.get(); - writeCommandToIODevice(QVariant::fromValue(synchronizeCommand), socket, m_writeCommandCounter); - m_writeCommandCounter++; + writeCommandToIODevice(QVariant::fromValue(synchronizeCommand), socket, writeCommandCounter()); + writeCommandCounter()++; while (socket->waitForReadyRead(100)) { - readDataStream(m_connections.front()); + readDataStream(connections().front()); if (m_synchronizeId == synchronizeId) return; } diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index a5441050a94..37b9832c3a1 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -239,7 +239,7 @@ def main(): clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) continue test.compare(filenameCombo.currentText, "%s: %s" % (protocol, pasteId), "Verify title of editor") - if protocol in (NAME_PBCOM, NAME_DPCOM) and pastedText.endswith("\n"): + if protocol in (NAME_DPCOM) and pastedText.endswith("\n"): pastedText = pastedText[:-1] test.compare(editor.plainText, pastedText, "Verify that pasted and fetched texts are the same") diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index 13741ae4789..86f27616f35 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -40,7 +40,6 @@ add_qtc_test(unittest GTEST clientserveroutsideprocess-test.cpp commandlinebuilder-test.cpp compare-operators.h - compilationdatabaseutils-test.cpp compileroptionsbuilder-test.cpp conditionally-disabled-tests.h cppprojectfilecategorizer-test.cpp @@ -319,7 +318,7 @@ extend_qtc_test(unittest ) extend_qtc_test(unittest - CONDITION TARGET clangFormat + CONDITION TARGET ClangFormat DEPENDS clangFormat SOURCES clangformat-test.cpp @@ -421,9 +420,8 @@ extend_qtc_test_with_target_sources(CPlusPlus DEFINES CPLUSPLUS_BUILD_STATIC_LIB extend_qtc_test_with_target_sources(3rd_cplusplus DEFINES CPLUSPLUS_BUILD_LIB) extend_qtc_test_with_target_sources(ClangSupport DEFINES CLANGSUPPORT_BUILD_LIB) -get_target_property(ClangCodeModelSourcesDir ClangCodeModel SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${ClangCodeModelSourcesDir}" + SOURCES_PREFIX_FROM_TARGET ClangCodeModel SOURCES clangactivationsequencecontextprocessor.cpp clangactivationsequencecontextprocessor.h clangactivationsequenceprocessor.cpp clangactivationsequenceprocessor.h @@ -436,16 +434,20 @@ extend_qtc_test(unittest clangisdiagnosticrelatedtolocation.h ) -get_target_property(CompilationDatabasePMSourcesDir CompilationDatabaseProjectManager SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${CompilationDatabasePMSourcesDir}" + SOURCES_PREFIX_FROM_TARGET CompilationDatabaseProjectManager SOURCES compilationdatabaseutils.cpp compilationdatabaseutils.h ) -get_target_property(CoreSourcesDir Core SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${CoreSourcesDir}" + CONDITION TARGET CompilationDatabaseProjectManager + SOURCES + compilationdatabaseutils-test.cpp +) + +extend_qtc_test(unittest + SOURCES_PREFIX_FROM_TARGET Core DEFINES CORE_STATIC_LIBRARY SOURCES coreicons.cpp coreicons.h @@ -453,9 +455,8 @@ extend_qtc_test(unittest locator/ilocatorfilter.cpp locator/ilocatorfilter.h ) -get_target_property(CppToolsSourcesDir CppTools SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${CppToolsSourcesDir}" + SOURCES_PREFIX_FROM_TARGET CppTools DEFINES CPPTOOLS_STATIC_LIBRARY SOURCES cppprojectfile.cpp cppprojectfile.h @@ -469,9 +470,8 @@ extend_qtc_test(unittest headerpathfilter.cpp headerpathfilter.h ) -get_target_property(ProjectExplorerSourcesDir ProjectExplorer SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${ProjectExplorerSourcesDir}" + SOURCES_PREFIX_FROM_TARGET ProjectExplorer DEFINES PROJECTEXPLORER_STATIC_LIBRARY SOURCES projectmacro.cpp projectmacro.h @@ -517,9 +517,8 @@ extend_qtc_test(unittest progressmanagerinterface.h ) -get_target_property(ClangFormatSourcesDir ClangFormat SOURCES_DIR) extend_qtc_test(unittest - SOURCES_PREFIX "${ClangFormatSourcesDir}" + SOURCES_PREFIX_FROM_TARGET ClangFormat DEFINES CLANGPCHMANAGER_STATIC_LIB SOURCES clangformatconstants.h diff --git a/tests/unit/unittest/unittest.qbs b/tests/unit/unittest/unittest.qbs index ac7eb08b822..5ceb723b220 100644 --- a/tests/unit/unittest/unittest.qbs +++ b/tests/unit/unittest/unittest.qbs @@ -333,19 +333,6 @@ Project { "unittests-main.cpp", "usedmacrofilter-test.cpp", "utf8-test.cpp", - "imagecache-test.cpp", - "imagecachegenerator-test.cpp", - "imagecachestorage-test.cpp", - "sqlitedatabasemock.h", - "sqlitereadstatementmock.h", - "sqlitestatementmock.h", - "sqlitetransactionbackendmock.h", - "sqlitewritestatementmock.h", - "notification.h", - "mocktimestampprovider.h", - "imagecachecollectormock.h", - "mockimagecachegenerator.h", - "mockimagecachestorage.h", ] Group { |