Commit 54c8a2e5 authored by Bill King's avatar Bill King

Tests: Get autotests compiling again.

parent f0aa5cda
...@@ -3,5 +3,6 @@ CONFIG += qt warn_on console depend_includepath ...@@ -3,5 +3,6 @@ CONFIG += qt warn_on console depend_includepath
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
CONFIG -= app_bundle CONFIG -= app_bundle
include(../shared/shared.pri) include(../shared/shared.pri)
INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins
SOURCES += tst_codegen.cpp SOURCES += tst_codegen.cpp
TARGET=tst_$$TARGET
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
#include <Control.h> #include <Control.h>
#include <CppDocument.h> #include <CppDocument.h>
#include <DiagnosticClient.h> #include <DiagnosticClient.h>
#include <InsertionPointLocator.h>
#include <Scope.h> #include <Scope.h>
#include <TranslationUnit.h> #include <TranslationUnit.h>
#include <Literals.h> #include <Literals.h>
#include <Bind.h> #include <Bind.h>
#include <Symbols.h> #include <Symbols.h>
#include <cpptools/insertionpointlocator.h>
#include <cpptools/cpprefactoringchanges.h>
#include <QtTest> #include <QtTest>
#include <QtDebug> #include <QtDebug>
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
tests the InsertionPointLocator. tests the InsertionPointLocator.
*/ */
using namespace CPlusPlus; using namespace CPlusPlus;
using namespace CppTools;
class tst_Codegen: public QObject class tst_Codegen: public QObject
{ {
...@@ -61,7 +63,8 @@ void tst_Codegen::public_in_empty_class() ...@@ -61,7 +63,8 @@ void tst_Codegen::public_in_empty_class()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -100,7 +103,8 @@ void tst_Codegen::public_in_nonempty_class() ...@@ -100,7 +103,8 @@ void tst_Codegen::public_in_nonempty_class()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -139,7 +143,8 @@ void tst_Codegen::public_before_protected() ...@@ -139,7 +143,8 @@ void tst_Codegen::public_before_protected()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -179,7 +184,8 @@ void tst_Codegen::private_after_protected() ...@@ -179,7 +184,8 @@ void tst_Codegen::private_after_protected()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -219,7 +225,8 @@ void tst_Codegen::protected_in_nonempty_class() ...@@ -219,7 +225,8 @@ void tst_Codegen::protected_in_nonempty_class()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -259,7 +266,8 @@ void tst_Codegen::protected_betwee_public_and_private() ...@@ -259,7 +266,8 @@ void tst_Codegen::protected_betwee_public_and_private()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
...@@ -319,7 +327,8 @@ void tst_Codegen::qtdesigner_integration() ...@@ -319,7 +327,8 @@ void tst_Codegen::qtdesigner_integration()
Snapshot snapshot; Snapshot snapshot;
snapshot.insert(doc); snapshot.insert(doc);
InsertionPointLocator find(snapshot); CppRefactoringChanges changes(snapshot);
InsertionPointLocator find(&changes);
InsertionLocation loc = find.methodDeclarationInClass( InsertionLocation loc = find.methodDeclarationInClass(
doc->fileName(), doc->fileName(),
foo, foo,
......
...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath ...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
include(../shared/shared.pri) include(../shared/shared.pri)
SOURCES += tst_findusages.cpp SOURCES += tst_findusages.cpp
TARGET=tst_$$TARGET
...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath ...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
include(../shared/shared.pri) include(../shared/shared.pri)
SOURCES += tst_lookup.cpp SOURCES += tst_lookup.cpp
TARGET=tst_$$TARGET
...@@ -2,6 +2,4 @@ TEMPLATE = app ...@@ -2,6 +2,4 @@ TEMPLATE = app
CONFIG += qt warn_on console depend_includepath CONFIG += qt warn_on console depend_includepath
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
include(../shared/shared.pri) include(../shared/shared.pri)
SOURCES += tst_semantic.cpp SOURCES += tst_semantic.cpp
TARGET=tst_$$TARGET
...@@ -2,5 +2,5 @@ DEFINES+=CPLUSPLUS_BUILD_STATIC_LIB ...@@ -2,5 +2,5 @@ DEFINES+=CPLUSPLUS_BUILD_STATIC_LIB
include(../../../../qtcreator.pri) include(../../../../qtcreator.pri)
INCLUDEPATH += $$IDE_SOURCE_TREE/src/libs/cplusplus INCLUDEPATH += $$IDE_SOURCE_TREE/src/libs/cplusplus
INCLUDEPATH += $$IDE_SOURCE_TREE/src/shared/cplusplus INCLUDEPATH += $$IDE_SOURCE_TREE/src/shared/cplusplus
include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus-lib.pri) include($$IDE_SOURCE_TREE/src/plugins/cpptools/cpptools.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils-lib.pri) LIBS += -L$$IDE_PLUGIN_PATH/Nokia
...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath ...@@ -3,4 +3,3 @@ CONFIG += qt warn_on console depend_includepath
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
include(../shared/shared.pri) include(../shared/shared.pri)
SOURCES += tst_typeprettyprinter.cpp SOURCES += tst_typeprettyprinter.cpp
TARGET=tst_$$TARGET
...@@ -9,22 +9,14 @@ FAKEVIMDIR = ../../../src/plugins/fakevim ...@@ -9,22 +9,14 @@ FAKEVIMDIR = ../../../src/plugins/fakevim
UTILSDIR = ../../../src/libs UTILSDIR = ../../../src/libs
SOURCES += \ SOURCES += \
$$FAKEVIMDIR/fakevimhandler.cpp \ $$FAKEVIMDIR/fakevimhandler.cpp \
$$FAKEVIMDIR/fakevimactions.cpp \ $$FAKEVIMDIR/fakevimactions.cpp \
$$FAKEVIMDIR/fakevimsyntax.cpp \ $$FAKEVIMDIR/fakevimsyntax.cpp \
$$UTILSDIR/utils/environment.cpp \
$$UTILSDIR/utils/savedaction.cpp \
$$UTILSDIR/utils/pathchooser.cpp \
$$UTILSDIR/utils/basevalidatinglineedit.cpp \
tst_fakevim.cpp tst_fakevim.cpp
HEADERS += \ HEADERS += \
$$FAKEVIMDIR/fakevimhandler.h \ $$FAKEVIMDIR/fakevimhandler.h \
$$FAKEVIMDIR/fakevimactions.h \ $$FAKEVIMDIR/fakevimactions.h \
$$FAKEVIMDIR/fakevimsyntax.h \ $$FAKEVIMDIR/fakevimsyntax.h \
$$UTILSDIR/utils/environment.h \
$$UTILSDIR/utils/savedaction.h \
$$UTILSDIR/utils/pathchooser.h \
$$UTILSDIR/utils/basevalidatinglineedit.h \
INCLUDEPATH += $$FAKEVIMDIR $$UTILSDIR INCLUDEPATH += $$FAKEVIMDIR $$UTILSDIR
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
virtual ~SyntaxHighlighter() {} virtual ~SyntaxHighlighter() {}
protected: protected:
void SyntaxHighlighter::applyFormatToSpaces(const QString &, const QTextCharFormat &) void applyFormatToSpaces(const QString &, const QTextCharFormat &)
{} {}
}; };
......
...@@ -3,7 +3,8 @@ include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/config.pri) ...@@ -3,7 +3,8 @@ include($$IDE_SOURCE_TREE/src/plugins/qmldesigner/config.pri)
QT += script \ QT += script \
network \ network \
declarative declarative \
webkit
CONFIG += qtestlib testcase CONFIG += qtestlib testcase
......
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