summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2010-08-19 11:54:51 +1000
committerBill King <bill.king@nokia.com>2010-08-19 11:56:53 +1000
commit7f9a448eeb3b4f1ff77aecdff82c298aea4f7a30 (patch)
treede11e68b02688f89d6bc683e7ec5b2274aa8dddf
parent5b2fb4bb67417cc1018ceef408cb7347c3e91931 (diff)
downloadqt-creator-7f9a448eeb3b4f1ff77aecdff82c298aea4f7a30.tar.gz
Fixes: Tests should have unique names.
Details: Autotests need to be named uniquely, otherwise all sorts of databases get lost and confused.
-rw-r--r--tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.pro (renamed from tests/auto/qml/qmleditor/codeformatter/codeformatter.pro)8
-rw-r--r--tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp (renamed from tests/auto/qml/qmleditor/codeformatter/tst_codeformatter.cpp)76
-rw-r--r--tests/auto/qml/qmleditor/qmleditor.pro3
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/data/localIdLookup.qml (renamed from tests/auto/qml/qmleditor/lookup/data/localIdLookup.qml)0
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/data/localRootLookup.qml (renamed from tests/auto/qml/qmleditor/lookup/data/localRootLookup.qml)0
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/data/localScopeLookup.qml (renamed from tests/auto/qml/qmleditor/lookup/data/localScopeLookup.qml)0
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/data/localScriptMethodLookup.qml (renamed from tests/auto/qml/qmleditor/lookup/data/localScriptMethodLookup.qml)0
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/qmllookup.pro (renamed from tests/auto/qml/qmleditor/lookup/lookup.pro)9
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/testfiles.qrc (renamed from tests/auto/qml/qmleditor/lookup/testfiles.qrc)0
-rw-r--r--tests/auto/qml/qmleditor/qmllookup/tst_qmllookup.cpp (renamed from tests/auto/qml/qmleditor/lookup/tst_lookup.cpp)20
10 files changed, 54 insertions, 62 deletions
diff --git a/tests/auto/qml/qmleditor/codeformatter/codeformatter.pro b/tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.pro
index ee95456908..6464c16bb4 100644
--- a/tests/auto/qml/qmleditor/codeformatter/codeformatter.pro
+++ b/tests/auto/qml/qmleditor/qmlcodeformatter/qmlcodeformatter.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
-CONFIG += qt warn_on console depend_includepath
-QT += testlib network
+CONFIG += qt warn_on console depend_includepath qtestlib testcase
+QT += network
SRCDIR = ../../../../../src
@@ -11,7 +11,7 @@ include($$SRCDIR/libs/utils/utils-lib.pri)
#LIBS += -L$$IDE_LIBRARY_PATH
SOURCES += \
- tst_codeformatter.cpp \
+ tst_qmlcodeformatter.cpp \
$$SRCDIR/plugins/qmljseditor/qmljseditorcodeformatter.cpp \
$$SRCDIR/plugins/texteditor/basetextdocumentlayout.cpp
@@ -20,5 +20,3 @@ HEADERS += \
$$SRCDIR/plugins/texteditor/basetextdocumentlayout.h \
INCLUDEPATH += $$SRCDIR/plugins $$SRCDIR/libs
-
-TARGET=tst_$$TARGET
diff --git a/tests/auto/qml/qmleditor/codeformatter/tst_codeformatter.cpp b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
index 336e642eaf..4f5d8464ba 100644
--- a/tests/auto/qml/qmleditor/codeformatter/tst_codeformatter.cpp
+++ b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
@@ -8,7 +8,7 @@
using namespace QmlJSEditor;
-class tst_CodeFormatter: public QObject
+class tst_QMLCodeFormatter: public QObject
{
Q_OBJECT
@@ -105,7 +105,7 @@ void checkIndent(QList<Line> data, int style = 0)
}
}
-void tst_CodeFormatter::objectDefinitions1()
+void tst_QMLCodeFormatter::objectDefinitions1()
{
QList<Line> data;
data << Line("import Qt 4.7")
@@ -127,7 +127,7 @@ void tst_CodeFormatter::objectDefinitions1()
checkIndent(data);
}
-void tst_CodeFormatter::objectDefinitions2()
+void tst_QMLCodeFormatter::objectDefinitions2()
{
QList<Line> data;
data << Line("import Qt 4.7")
@@ -141,7 +141,7 @@ void tst_CodeFormatter::objectDefinitions2()
checkIndent(data);
}
-void tst_CodeFormatter::expressionEndSimple()
+void tst_QMLCodeFormatter::expressionEndSimple()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -156,7 +156,7 @@ void tst_CodeFormatter::expressionEndSimple()
checkIndent(data);
}
-void tst_CodeFormatter::expressionEnd()
+void tst_QMLCodeFormatter::expressionEnd()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -172,7 +172,7 @@ void tst_CodeFormatter::expressionEnd()
checkIndent(data);
}
-void tst_CodeFormatter::expressionEndParen()
+void tst_QMLCodeFormatter::expressionEndParen()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -190,7 +190,7 @@ void tst_CodeFormatter::expressionEndParen()
checkIndent(data);
}
-void tst_CodeFormatter::expressionEndBracket()
+void tst_QMLCodeFormatter::expressionEndBracket()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -208,7 +208,7 @@ void tst_CodeFormatter::expressionEndBracket()
checkIndent(data);
}
-void tst_CodeFormatter::objectBinding()
+void tst_QMLCodeFormatter::objectBinding()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -227,7 +227,7 @@ void tst_CodeFormatter::objectBinding()
checkIndent(data);
}
-void tst_CodeFormatter::arrayBinding()
+void tst_QMLCodeFormatter::arrayBinding()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -258,7 +258,7 @@ void tst_CodeFormatter::arrayBinding()
-void tst_CodeFormatter::moreIfThenElse()
+void tst_QMLCodeFormatter::moreIfThenElse()
{
QList<Line> data;
data << Line("Image {")
@@ -276,7 +276,7 @@ void tst_CodeFormatter::moreIfThenElse()
}
-void tst_CodeFormatter::functionDeclaration()
+void tst_QMLCodeFormatter::functionDeclaration()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -310,7 +310,7 @@ void tst_CodeFormatter::functionDeclaration()
checkIndent(data);
}
-void tst_CodeFormatter::functionExpression()
+void tst_QMLCodeFormatter::functionExpression()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -329,7 +329,7 @@ void tst_CodeFormatter::functionExpression()
checkIndent(data);
}
-void tst_CodeFormatter::propertyDeclarations()
+void tst_QMLCodeFormatter::propertyDeclarations()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -352,7 +352,7 @@ void tst_CodeFormatter::propertyDeclarations()
checkIndent(data);
}
-void tst_CodeFormatter::signalDeclarations()
+void tst_QMLCodeFormatter::signalDeclarations()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -371,7 +371,7 @@ void tst_CodeFormatter::signalDeclarations()
checkIndent(data);
}
-void tst_CodeFormatter::ifBinding1()
+void tst_QMLCodeFormatter::ifBinding1()
{
QList<Line> data;
data << Line("A.Rectangle {")
@@ -401,7 +401,7 @@ void tst_CodeFormatter::ifBinding1()
checkIndent(data);
}
-void tst_CodeFormatter::ifBinding2()
+void tst_QMLCodeFormatter::ifBinding2()
{
QList<Line> data;
data << Line("A.Rectangle {")
@@ -427,7 +427,7 @@ void tst_CodeFormatter::ifBinding2()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementWithoutBraces1()
+void tst_QMLCodeFormatter::ifStatementWithoutBraces1()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -450,7 +450,7 @@ void tst_CodeFormatter::ifStatementWithoutBraces1()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementWithoutBraces2()
+void tst_QMLCodeFormatter::ifStatementWithoutBraces2()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -480,7 +480,7 @@ void tst_CodeFormatter::ifStatementWithoutBraces2()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementWithBraces1()
+void tst_QMLCodeFormatter::ifStatementWithBraces1()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -505,7 +505,7 @@ void tst_CodeFormatter::ifStatementWithBraces1()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementWithBraces2()
+void tst_QMLCodeFormatter::ifStatementWithBraces2()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -540,7 +540,7 @@ void tst_CodeFormatter::ifStatementWithBraces2()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementMixed()
+void tst_QMLCodeFormatter::ifStatementMixed()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -559,7 +559,7 @@ void tst_CodeFormatter::ifStatementMixed()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementAndComments()
+void tst_QMLCodeFormatter::ifStatementAndComments()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -583,7 +583,7 @@ void tst_CodeFormatter::ifStatementAndComments()
checkIndent(data);
}
-void tst_CodeFormatter::ifStatementLongCondition()
+void tst_QMLCodeFormatter::ifStatementLongCondition()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -600,7 +600,7 @@ void tst_CodeFormatter::ifStatementLongCondition()
checkIndent(data);
}
-void tst_CodeFormatter::strayElse()
+void tst_QMLCodeFormatter::strayElse()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -613,7 +613,7 @@ void tst_CodeFormatter::strayElse()
checkIndent(data);
}
-void tst_CodeFormatter::oneLineIf()
+void tst_QMLCodeFormatter::oneLineIf()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -624,7 +624,7 @@ void tst_CodeFormatter::oneLineIf()
checkIndent(data);
}
-void tst_CodeFormatter::forStatement()
+void tst_QMLCodeFormatter::forStatement()
{
QList<Line> data;
data << Line("for (var i = 0; i < 20; ++i) {")
@@ -647,7 +647,7 @@ void tst_CodeFormatter::forStatement()
checkIndent(data);
}
-void tst_CodeFormatter::whileStatement()
+void tst_QMLCodeFormatter::whileStatement()
{
QList<Line> data;
data << Line("while (i < 20) {")
@@ -670,7 +670,7 @@ void tst_CodeFormatter::whileStatement()
checkIndent(data);
}
-void tst_CodeFormatter::tryStatement()
+void tst_QMLCodeFormatter::tryStatement()
{
QList<Line> data;
data << Line("try {")
@@ -688,7 +688,7 @@ void tst_CodeFormatter::tryStatement()
checkIndent(data);
}
-void tst_CodeFormatter::doWhile()
+void tst_QMLCodeFormatter::doWhile()
{
QList<Line> data;
data << Line("function foo() {")
@@ -705,7 +705,7 @@ void tst_CodeFormatter::doWhile()
checkIndent(data);
}
-void tst_CodeFormatter::cStyleComments()
+void tst_QMLCodeFormatter::cStyleComments()
{
QList<Line> data;
data << Line("/*")
@@ -735,7 +735,7 @@ void tst_CodeFormatter::cStyleComments()
checkIndent(data);
}
-void tst_CodeFormatter::cppStyleComments()
+void tst_QMLCodeFormatter::cppStyleComments()
{
QList<Line> data;
data << Line("// abc")
@@ -751,7 +751,7 @@ void tst_CodeFormatter::cppStyleComments()
checkIndent(data);
}
-void tst_CodeFormatter::ternary()
+void tst_QMLCodeFormatter::ternary()
{
QList<Line> data;
data << Line("function foo() {")
@@ -774,7 +774,7 @@ void tst_CodeFormatter::ternary()
checkIndent(data);
}
-void tst_CodeFormatter::switch1()
+void tst_QMLCodeFormatter::switch1()
{
QList<Line> data;
data << Line("function foo() {")
@@ -803,7 +803,7 @@ void tst_CodeFormatter::switch1()
checkIndent(data);
}
-//void tst_CodeFormatter::gnuStyle()
+//void tst_QMLCodeFormatter::gnuStyle()
//{
// QList<Line> data;
// data << Line("struct S")
@@ -830,7 +830,7 @@ void tst_CodeFormatter::switch1()
// checkIndent(data, 1);
//}
-//void tst_CodeFormatter::whitesmithsStyle()
+//void tst_QMLCodeFormatter::whitesmithsStyle()
//{
// QList<Line> data;
// data << Line("struct S")
@@ -850,7 +850,7 @@ void tst_CodeFormatter::switch1()
// checkIndent(data, 2);
//}
-void tst_CodeFormatter::qmlKeywords()
+void tst_QMLCodeFormatter::qmlKeywords()
{
QList<Line> data;
data << Line("Rectangle {")
@@ -868,7 +868,7 @@ void tst_CodeFormatter::qmlKeywords()
checkIndent(data);
}
-void tst_CodeFormatter::expressionContinuation()
+void tst_QMLCodeFormatter::expressionContinuation()
{
QList<Line> data;
data << Line("var x = 1 ? 2")
@@ -883,6 +883,6 @@ void tst_CodeFormatter::expressionContinuation()
}
QTEST_APPLESS_MAIN(tst_CodeFormatter)
-#include "tst_codeformatter.moc"
+#include "tst_qmlcodeformatter.moc"
diff --git a/tests/auto/qml/qmleditor/qmleditor.pro b/tests/auto/qml/qmleditor/qmleditor.pro
index 7c5fddb9a7..bd9d6f37a3 100644
--- a/tests/auto/qml/qmleditor/qmleditor.pro
+++ b/tests/auto/qml/qmleditor/qmleditor.pro
@@ -1,3 +1,2 @@
TEMPLATE = subdirs
-
-SUBDIRS += lookup codeformatter
+SUBDIRS += qmllookup qmlcodeformatter
diff --git a/tests/auto/qml/qmleditor/lookup/data/localIdLookup.qml b/tests/auto/qml/qmleditor/qmllookup/data/localIdLookup.qml
index f3df6cd5e3..f3df6cd5e3 100644
--- a/tests/auto/qml/qmleditor/lookup/data/localIdLookup.qml
+++ b/tests/auto/qml/qmleditor/qmllookup/data/localIdLookup.qml
diff --git a/tests/auto/qml/qmleditor/lookup/data/localRootLookup.qml b/tests/auto/qml/qmleditor/qmllookup/data/localRootLookup.qml
index 74562a03e6..74562a03e6 100644
--- a/tests/auto/qml/qmleditor/lookup/data/localRootLookup.qml
+++ b/tests/auto/qml/qmleditor/qmllookup/data/localRootLookup.qml
diff --git a/tests/auto/qml/qmleditor/lookup/data/localScopeLookup.qml b/tests/auto/qml/qmleditor/qmllookup/data/localScopeLookup.qml
index e103232e4b..e103232e4b 100644
--- a/tests/auto/qml/qmleditor/lookup/data/localScopeLookup.qml
+++ b/tests/auto/qml/qmleditor/qmllookup/data/localScopeLookup.qml
diff --git a/tests/auto/qml/qmleditor/lookup/data/localScriptMethodLookup.qml b/tests/auto/qml/qmleditor/qmllookup/data/localScriptMethodLookup.qml
index 9d3f39bef4..9d3f39bef4 100644
--- a/tests/auto/qml/qmleditor/lookup/data/localScriptMethodLookup.qml
+++ b/tests/auto/qml/qmleditor/qmllookup/data/localScriptMethodLookup.qml
diff --git a/tests/auto/qml/qmleditor/lookup/lookup.pro b/tests/auto/qml/qmleditor/qmllookup/qmllookup.pro
index 1c7d8b2adc..6a6210ec36 100644
--- a/tests/auto/qml/qmleditor/lookup/lookup.pro
+++ b/tests/auto/qml/qmleditor/qmllookup/qmllookup.pro
@@ -1,18 +1,13 @@
TEMPLATE = app
-CONFIG += qt warn_on console depend_includepath
-QT += testlib
+CONFIG += qt warn_on console depend_includepath qtestlib testcase
include(../../../../../src/libs/qmljs/qmljs-lib.pri)
DEFINES += QML_BUILD_STATIC_LIB
EDITOR_DIR=../../../../../src/plugins/qmljseditor
INCLUDEPATH += $$EDITOR_DIR
-TARGET=tst_$$TARGET
+SOURCES += tst_qmllookup.cpp
-SOURCES += tst_lookup.cpp \
- $$EDITOR_DIR/qmllookupcontext.cpp
-
-HEADERS += $$EDITOR_DIR/qmllookupcontext.h
RESOURCES += testfiles.qrc
OTHER_FILES += \
diff --git a/tests/auto/qml/qmleditor/lookup/testfiles.qrc b/tests/auto/qml/qmleditor/qmllookup/testfiles.qrc
index b780e4149e..b780e4149e 100644
--- a/tests/auto/qml/qmleditor/lookup/testfiles.qrc
+++ b/tests/auto/qml/qmleditor/qmllookup/testfiles.qrc
diff --git a/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp b/tests/auto/qml/qmleditor/qmllookup/tst_qmllookup.cpp
index b43bc5e5e9..198e1e00b3 100644
--- a/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp
+++ b/tests/auto/qml/qmleditor/qmllookup/tst_qmllookup.cpp
@@ -15,13 +15,13 @@ using namespace QmlJSEditor::Internal;
using namespace QmlJS;
using namespace QmlJS::AST;
-class tst_Lookup: public QObject
+class tst_QMLLookup: public QObject
{
Q_OBJECT
public:
- tst_Lookup(): _typeSystem(0) {}
- ~tst_Lookup() { if (_typeSystem) resetTypeSystem(); }
+ tst_QMLLookup(): _typeSystem(0) {}
+ ~tst_QMLLookup() { if (_typeSystem) resetTypeSystem(); }
void resetTypeSystem() { if (_typeSystem) { delete _typeSystem; _typeSystem = 0; }}
@@ -72,7 +72,7 @@ private:
TypeSystem *_typeSystem;
};
-void tst_Lookup::basicSymbolTest()
+void tst_QMLLookup::basicSymbolTest()
{
const QLatin1String input(
"import Qt 4.6\n"
@@ -121,7 +121,7 @@ void tst_Lookup::basicSymbolTest()
QCOMPARE(xSymbol->name(), QLatin1String("x"));
}
-void tst_Lookup::basicLookupTest()
+void tst_QMLLookup::basicLookupTest()
{
const QLatin1String input(
"import Qt 4.6\n"
@@ -170,7 +170,7 @@ void tst_Lookup::basicLookupTest()
QVERIFY(fontPropFound);
}
-void tst_Lookup::localIdLookup()
+void tst_QMLLookup::localIdLookup()
{
QFile input(":/data/localIdLookup.qml");
QVERIFY(input.open(QIODevice::ReadOnly));
@@ -208,7 +208,7 @@ void tst_Lookup::localIdLookup()
}
}
-void tst_Lookup::localScriptMethodLookup()
+void tst_QMLLookup::localScriptMethodLookup()
{
QFile input(":/data/localScriptMethodLookup.qml");
QVERIFY(input.open(QIODevice::ReadOnly));
@@ -246,7 +246,7 @@ void tst_Lookup::localScriptMethodLookup()
}
}
-void tst_Lookup::localScopeLookup()
+void tst_QMLLookup::localScopeLookup()
{
QFile input(":/data/localScopeLookup.qml");
QVERIFY(input.open(QIODevice::ReadOnly));
@@ -284,7 +284,7 @@ void tst_Lookup::localScopeLookup()
}
}
-void tst_Lookup::localRootLookup()
+void tst_QMLLookup::localRootLookup()
{
QFile input(":/data/localRootLookup.qml");
QVERIFY(input.open(QIODevice::ReadOnly));
@@ -321,4 +321,4 @@ void tst_Lookup::localRootLookup()
}
QTEST_APPLESS_MAIN(tst_Lookup)
-#include "tst_lookup.moc"
+#include "tst_qmllookup.moc"