Added a simple auto test for the name lookup.

This commit is contained in:
Roberto Raggi
2009-02-09 10:21:29 +01:00
parent 47a85d5a42
commit 1f9bcd86e0
8 changed files with 118 additions and 55 deletions

View File

@@ -34,7 +34,7 @@
#ifndef CPLUSPLUS_LOOKUPCONTEXT_H
#define CPLUSPLUS_LOOKUPCONTEXT_H
#include <cplusplus/CppDocument.h>
#include "CppDocument.h"
#include <QPair>
namespace CPlusPlus {

View File

@@ -32,12 +32,12 @@
***************************************************************************/
#include "TypeOfExpression.h"
#include <TranslationUnit.h>
#include "LookupContext.h"
#include "ResolveExpression.h"
#include "pp.h"
#include <AST.h>
#include <TranslationUnit.h>
#include <cplusplus/LookupContext.h>
#include <cplusplus/ResolveExpression.h>
#include <cplusplus/pp.h>
#include <QSet>
using namespace CPlusPlus;

View File

@@ -33,10 +33,10 @@
#ifndef CPLUSPLUS_TYPEOFEXPRESSION_H
#define CPLUSPLUS_TYPEOFEXPRESSION_H
#include <ASTfwd.h>
#include <cplusplus/CppDocument.h>
#include <cplusplus/LookupContext.h>
#include "CppDocument.h"
#include "LookupContext.h"
#include <ASTfwd.h>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QString>

View File

@@ -0,0 +1,48 @@
DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE CPLUSPLUS_BUILD_LIB
INCLUDEPATH += $$PWD
include(../../shared/cplusplus/cplusplus.pri)
HEADERS += \
$$PWD/SimpleLexer.h \
$$PWD/ExpressionUnderCursor.h \
$$PWD/TokenUnderCursor.h \
$$PWD/CppDocument.h \
$$PWD/Icons.h \
$$PWD/Overview.h \
$$PWD/OverviewModel.h \
$$PWD/NamePrettyPrinter.h \
$$PWD/TypeOfExpression.h \
$$PWD/TypePrettyPrinter.h \
$$PWD/ResolveExpression.h \
$$PWD/LookupContext.h \
$$PWD/PreprocessorClient.h \
$$PWD/PreprocessorEnvironment.h \
$$PWD/Macro.h \
$$PWD/pp.h \
$$PWD/pp-cctype.h \
$$PWD/pp-engine.h \
$$PWD/pp-macro-expander.h \
$$PWD/pp-scanner.h
SOURCES += \
$$PWD/SimpleLexer.cpp \
$$PWD/ExpressionUnderCursor.cpp \
$$PWD/TokenUnderCursor.cpp \
$$PWD/CppDocument.cpp \
$$PWD/Icons.cpp \
$$PWD/Overview.cpp \
$$PWD/OverviewModel.cpp \
$$PWD/NamePrettyPrinter.cpp \
$$PWD/TypeOfExpression.cpp \
$$PWD/TypePrettyPrinter.cpp \
$$PWD/ResolveExpression.cpp \
$$PWD/LookupContext.cpp \
$$PWD/PreprocessorClient.cpp \
$$PWD/PreprocessorEnvironment.cpp \
$$PWD/Macro.cpp \
$$PWD/pp-engine.cpp \
$$PWD/pp-macro-expander.cpp \
$$PWD/pp-scanner.cpp
RESOURCES += $$PWD/cplusplus.qrc

View File

@@ -2,53 +2,8 @@ TEMPLATE = lib
TARGET = CPlusPlus
DEFINES += HAVE_QT CPLUSPLUS_WITH_NAMESPACE CPLUSPLUS_BUILD_LIB
DEFINES += NDEBUG
unix:QMAKE_CXXFLAGS_DEBUG += -O3
include(../../qworkbenchlibrary.pri)
include(../../shared/cplusplus/cplusplus.pri)
HEADERS += \
SimpleLexer.h \
ExpressionUnderCursor.h \
TokenUnderCursor.h \
CppDocument.h \
Icons.h \
Overview.h \
OverviewModel.h \
NamePrettyPrinter.h \
TypeOfExpression.h \
TypePrettyPrinter.h \
ResolveExpression.h \
LookupContext.h \
PreprocessorClient.h \
PreprocessorEnvironment.h \
Macro.h \
pp.h \
pp-cctype.h \
pp-engine.h \
pp-macro-expander.h \
pp-scanner.h
SOURCES += \
SimpleLexer.cpp \
ExpressionUnderCursor.cpp \
TokenUnderCursor.cpp \
CppDocument.cpp \
Icons.cpp \
Overview.cpp \
OverviewModel.cpp \
NamePrettyPrinter.cpp \
TypeOfExpression.cpp \
TypePrettyPrinter.cpp \
ResolveExpression.cpp \
LookupContext.cpp \
PreprocessorClient.cpp \
PreprocessorEnvironment.cpp \
Macro.cpp \
pp-engine.cpp \
pp-macro-expander.cpp \
pp-scanner.cpp
RESOURCES += cplusplus.qrc
include(cplusplus-lib.pri)