summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-12-02 15:47:36 +0100
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-12-03 09:53:26 +0100
commit796fcaf1d288267e93baba3d01927957c684758f (patch)
treee3ee777c7100475c2156963bd19034ae35b04468 /tests
parent132954f9f307f87de901519230c309e202c2b87f (diff)
downloadqt-creator-796fcaf1d288267e93baba3d01927957c684758f.tar.gz
Revert "C++: Fix highlighting for lines with predefined macros"
This takes too much memory. For qtcreator.pro the numbers are as follows: Patch applied: ~ 1600MB (RES) Patch reverted: ~ 510MB (RES) This reverts commit 4c2daa90ce558c3b4287edc97127471486a411d9. Task-number: QTCREATORBUG-10973 Change-Id: I843bd7c1ea4a26a1ec55ddc14c2a34a98d040922 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp51
-rw-r--r--tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp6
2 files changed, 1 insertions, 56 deletions
diff --git a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
index 9afbd31573..26ece497a0 100644
--- a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
+++ b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
@@ -175,8 +175,6 @@ private slots:
void test_checksymbols_VirtualMethodUse();
void test_checksymbols_LabelUse();
void test_checksymbols_MacroUse();
- void test_checksymbols_Macros__FILE__LINE__DATE__TIME__1();
- void test_checksymbols_Macros__FILE__LINE__DATE__TIME__2();
void test_checksymbols_FunctionUse();
void test_checksymbols_PseudoKeywordUse();
void test_checksymbols_StaticUse();
@@ -328,55 +326,6 @@ void tst_CheckSymbols::test_checksymbols_MacroUse()
TestData::check(source, expectedUses, macroUses);
}
-void tst_CheckSymbols::test_checksymbols_Macros__FILE__LINE__DATE__TIME__1()
-{
- const QByteArray source =
- "#define FILE_DATE_TIME __FILE__ \" / \" __DATE__ \" / \" __TIME__\n"
- "#define LINE_NUMBER 0 + __LINE__\n"
- "\n"
- "void f()\n"
- "{\n"
- " class Printer;\n"
- " Printer::printText(FILE_DATE_TIME); Printer::printInteger(LINE_NUMBER); Printer::nl();\n"
- " return;\n"
- "}\n";
- const QList<Use> expectedUses = QList<Use>()
- << Use(4, 6, 1, CppHighlightingSupport::FunctionUse)
- << Use(6, 11, 7, CppHighlightingSupport::TypeUse)
- << Use(6, 11, 7, CppHighlightingSupport::TypeUse)
- << Use(7, 5, 7, CppHighlightingSupport::TypeUse)
- << Use(7, 41, 7, CppHighlightingSupport::TypeUse)
- << Use(7, 77, 7, CppHighlightingSupport::TypeUse)
- ;
-
- TestData::check(source, expectedUses);
-}
-
-void tst_CheckSymbols::test_checksymbols_Macros__FILE__LINE__DATE__TIME__2()
-{
- const QByteArray source =
- "void f()\n"
- "{\n"
- " class Printer;\n"
- " Printer::printInteger(__LINE__); Printer::printText(__FILE__); Printer::nl();\n"
- " Printer::printText(__DATE__); Printer::printText(__TIME__); Printer::nl();\n"
- " return;\n"
- "}\n";
- const QList<Use> expectedUses = QList<Use>()
- << Use(1, 6, 1, CppHighlightingSupport::FunctionUse)
- << Use(3, 11, 7, CppHighlightingSupport::TypeUse)
- << Use(3, 11, 7, CppHighlightingSupport::TypeUse)
- << Use(4, 5, 7, CppHighlightingSupport::TypeUse)
- << Use(4, 38, 7, CppHighlightingSupport::TypeUse)
- << Use(4, 68, 7, CppHighlightingSupport::TypeUse)
- << Use(5, 5, 7, CppHighlightingSupport::TypeUse)
- << Use(5, 35, 7, CppHighlightingSupport::TypeUse)
- << Use(5, 65, 7, CppHighlightingSupport::TypeUse)
- ;
-
- TestData::check(source, expectedUses);
-}
-
void tst_CheckSymbols::test_checksymbols_FunctionUse()
{
const QByteArray source =
diff --git a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
index 489722d675..2594bc692f 100644
--- a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
+++ b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
@@ -796,11 +796,7 @@ void tst_Preprocessor::builtin__FILE__()
));
const QByteArray result____ =
"# 1 \"some-file.c\"\n"
- "const char *f =\n"
- "# expansion begin 16,8 ~1\n"
- "\"some-file.c\"\n"
- "# expansion end\n"
- "# 2 \"some-file.c\"\n";
+ "const char *f = \"some-file.c\"\n";
QCOMPARE(preprocessed, result____);
}