From 3baa1b35e2d566931e4df3dd3cf354dcbacc89c9 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 28 Nov 2013 16:50:21 +0100 Subject: [PATCH] C++: Ensure test code is free of diagnostic messages in tst_checksymbols.cpp Change-Id: I11b3caf354d57f08268cca7bc2944ca7ae386bfb Reviewed-by: Orgad Shaneh Reviewed-by: Erik Verbruggen --- .../auto/cplusplus/checksymbols/tst_checksymbols.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp index 26ece497a03..3b891e78cb9 100644 --- a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp +++ b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp @@ -124,6 +124,7 @@ public: document->setUtf8Source(preprocessedSource); QVERIFY(document->parse(parseMode)); document->check(); + QVERIFY(document->diagnosticMessages().isEmpty()); snapshot.insert(document); } @@ -263,12 +264,14 @@ void tst_CheckSymbols::test_checksymbols_EnumerationUse() { const QByteArray source = "enum E { Red, Green, Blue };\n" - "E e = Red\n"; + "E e = Red;\n"; const QList expectedUses = QList() << Use(1, 6, 1, CppHighlightingSupport::TypeUse) << Use(1, 10, 3, CppHighlightingSupport::EnumerationUse) << Use(1, 15, 5, CppHighlightingSupport::EnumerationUse) << Use(1, 22, 4, CppHighlightingSupport::EnumerationUse) + << Use(2, 1, 1, CppHighlightingSupport::TypeUse) + << Use(2, 7, 3, CppHighlightingSupport::EnumerationUse) ; TestData::check(source, expectedUses); @@ -313,7 +316,7 @@ void tst_CheckSymbols::test_checksymbols_MacroUse() { const QByteArray source = "#define FOO 1+1\n" - "int f() { FOO }\n"; + "int f() { FOO; }\n"; const QList macroUses = QList() << Use(1, 9, 3, CppHighlightingSupport::MacroUse) << Use(2, 11, 3, CppHighlightingSupport::MacroUse); @@ -877,7 +880,7 @@ void tst_CheckSymbols::test_checksymbols_QTCREATORBUG8974_danglingPointer() " Singleton::instance().bar();\n" " Singleton::instance().bar();\n" " Singleton::instance().bar();\n" - "};\n" + "}\n" ; const QList expectedUses = QList() @@ -1477,7 +1480,7 @@ void tst_CheckSymbols::test_checksymbols_QTCREATORBUG9098() " {\n" " b.c;\n" " }\n" - "}\n" + "};\n" ; const QList expectedUses = QList()