Commit b52fca40 authored by Christian Stenger's avatar Christian Stenger

Tests: Re-enable qml auto tests

Change-Id: I424caba6b79423d1bf680fab3bd0ec089c564ace
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 32aeb579
......@@ -19,6 +19,12 @@ SUBDIRS += \
filesearch \
valgrind
#contains (QT_CONFIG, declarative) {
#SUBDIRS += qml
#}
lessThan(QT_MAJOR_VERSION, 5) {
contains(QT_CONFIG, declarative) {
SUBDIRS += qml
}
} else {
qtHaveModule(declarative) {
SUBDIRS += qml
}
}
import QtQuick 2.0
Item {
Item { // 324 1 4
x: {
switch (a) {
case 1:
......
QTC_LIB_DEPENDS += qmljs
include(../../../qttest.pri)
DEFINES+=QTCREATORDIR=\\\"$$IDE_SOURCE_TREE\\\"
DEFINES+=TESTSRCDIR=\\\"$$PWD\\\"
include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/languageutils/languageutils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs-lib.pri)
TARGET = tst_codemodel_check
SOURCES += \
......
......@@ -5,7 +5,6 @@ Autotest {
name: "QML code model check autotest"
Depends { name: "LanguageUtils" }
Depends { name: "QmlJS" }
Depends { name: "Utils" }
Depends { name: "Qt.widgets" }
files: "tst_check.cpp"
cpp.defines: base.concat([
......
QTC_LIB_DEPENDS += qmljs
include(../../qttest.pri)
DEFINES+=QTCREATORDIR=\\\"$$IDE_SOURCE_TREE\\\"
DEFINES+=TESTSRCDIR=\\\"$$PWD\\\"
include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/languageutils/languageutils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs-lib.pri)
DEFINES+=TESTSRCDIR=\\\"$$_PRO_FILE_PWD_\\\"
TARGET = tst_trie_check
......@@ -15,7 +12,6 @@ SOURCES += \
tst_testtrie.cpp
TEMPLATE = app
TARGET = tester
DEFINES += QMLJS_BUILD_DIR
OTHER_FILES += \
......
import qbs
import "../../autotest.qbs" as Autotest
Autotest {
name: "QML persistenttrie autotest"
Depends { name: "QmlJS" }
Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
files: [ "tst_testtrie.h", "tst_testtrie.cpp" ]
cpp.defines: base.concat([
'QMLJS_BUILD_DIR',
'QTCREATORDIR="' + project.ide_source_tree + '"',
'TESTSRCDIR="' + path + '"'
])
}
......@@ -45,7 +45,7 @@ void tst_TestTrie::initTestCase() {
const bool VERBOSE=false;
tst_TestTrie::tst_TestTrie() { QObject::QObject(); }
tst_TestTrie::tst_TestTrie() { }
void tst_TestTrie::testListAll_data()
{
......
TEMPLATE = subdirs
SUBDIRS += qmldesigner \
SUBDIRS += \
#qmldesigner \
qmleditor \
qmljssimplereader \
qmlprojectmanager \
codemodel \
reformatter \
qrcparser
qrcparser \
persistenttrie
......@@ -9,6 +9,7 @@ Project {
"qmljssimplereader/qmljssimplereader.qbs",
"qmlprojectmanager/qmlprojectmanager.qbs",
"qrcparser/qrcparser.qbs",
"reformatter/reformatter.qbs"
"reformatter/reformatter.qbs",
"persistenttrie/persistenttrie.qbs"
]
}
QTC_LIB_DEPENDS += qmljs
QTC_PLUGIN_DEPENDS += qmljstools
include(../../../qttest.pri)
SRCDIR = ../../../../../src
SRCDIR = $$IDE_SOURCE_TREE/src
include($$SRCDIR/libs/qmljs/qmljs-lib.pri)
include($$SRCDIR/libs/utils/utils-lib.pri)
include($$SRCDIR/libs/languageutils/languageutils-lib.pri)
LIBS += -L$$IDE_PLUGIN_PATH/QtProject
SOURCES += \
tst_qmlcodeformatter.cpp \
$$SRCDIR/plugins/qmljstools/qmljsqtstylecodeformatter.cpp \
$$SRCDIR/plugins/texteditor/basetextdocumentlayout.cpp \
$$SRCDIR/plugins/texteditor/itextmark.cpp
HEADERS += \
$$SRCDIR/plugins/qmljstools/qmljsqtstylecodeformatter.h \
$$SRCDIR/plugins/texteditor/basetextdocumentlayout.h \
$$SRCDIR/plugins/texteditor/itextmark.h
tst_qmlcodeformatter.cpp
......@@ -3,10 +3,8 @@ import "../../../autotest.qbs" as Autotest
Autotest {
name: "QML code formatter autotest"
Depends { name: "LanguageUtils" }
Depends { name: "QmlJS" }
Depends { name: "QmlJSTools" }
Depends { name: "Utils" }
Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
files: "tst_qmlcodeformatter.cpp"
}
QTC_LIB_DEPENDS += qmljs
include(../../qttest.pri)
DEFINES+=QTCREATORDIR=\\\"$$IDE_SOURCE_TREE\\\"
DEFINES+=TESTSRCDIR=\\\"$$PWD\\\"
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs.pri)
DEFINES+=TESTSRCDIR=\\\"$$_PRO_FILE_PWD_\\\"
TARGET = tst_qmljssimplereader
......
......@@ -4,7 +4,6 @@ import "../../autotest.qbs" as Autotest
Autotest {
name: "QMLJS simple reader autotest"
Depends { name: "QmlJS" }
Depends { name: "Utils" }
Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
files: "tst_qmljssimplereader.cpp"
cpp.defines: base.concat(["QT_CREATOR"])
......
import QmlProject 1.0
Project {
QmlFiles {
recursive: false
}
}
import QmlProject 1.0
Project {
QmlFiles {
directory: "subdir"
}
}
import QmlProject 1.0
Project {
QmlFiles {
directory: "."
recursive: false
}
QmlFiles {
directory: "subdir"
}
}
import QmlProject 1.0
Project {
QmlFiles {
paths: [ "file1.qml",
"file2.qml" ]
}
}
import QmlProject 1.0
Project {
ImageFiles {
directory: "."
}
}
import QmlProject 1.0
Project {
ImageFiles {
filter: "?mage.[gf]if"
}
}
import QmlProject 1.1
Project {
Files {
filter: "image.gif"
}
}
import QmlProject 1.0
Project {
importPaths: [ "../otherLibrary", "library" ]
}
import QmlProject 1.1
Project {
mainFile: "file1.qml"
}
import QmlProject 1.0
Project {
QmlFiles {
recursive: true
}
JavaScriptFiles {
paths: ["script.js"]
}
}
QTC_LIB_DEPENDS += qmljs
include(../../../qttest.pri)
QT += script \
declarative
PLUGIN_DIR=../../../../../src/plugins/qmlprojectmanager
PLUGIN_DIR=$$IDE_SOURCE_TREE/src/plugins/qmlprojectmanager
include($$PLUGIN_DIR/fileformat/fileformat.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils_dependencies.pri)
INCLUDEPATH += $$PLUGIN_DIR/fileformat
DEFINES += SRCDIR=\\\"$$PWD\\\"
DEFINES += SRCDIR=\\\"$$_PRO_FILE_PWD_\\\"
TEMPLATE = app
SOURCES += tst_fileformat.cpp
......@@ -2,7 +2,6 @@ import qbs
import "../../../autotest.qbs" as Autotest
Autotest {
condition: false
name: "QmlProjectManager file format autotest"
Depends { name: "QmlProjectManager" }
Depends { name: "Utils" }
......
import qbs
Project {
condition: false // Known to be broken, nobody cares.
name: "QmlProjectManager autotests"
references: "fileformat/fileformat.qbs"
}
QTC_LIB_DEPENDS += qmljs
include(../../qttest.pri)
DEFINES+=QTCREATORDIR=\\\"$$IDE_SOURCE_TREE\\\"
DEFINES+=TESTSRCDIR=\\\"$$PWD\\\"
include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri)
include($$IDE_SOURCE_TREE/src/libs/qmljs/qmljs-lib.pri)
DEFINES+=TESTSRCDIR=\\\"$$_PRO_FILE_PWD_\\\"
TARGET = tst_reformatter
......
......@@ -4,7 +4,6 @@ import "../../autotest.qbs" as Autotest
Autotest {
name: "QML reformatter autotest"
Depends { name: "QmlJS" }
Depends { name: "Utils" }
Depends { name: "Qt.widgets" } // TODO: Remove when qbs bug is fixed
files: "tst_reformatter.cpp"
cpp.defines: base.concat([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment