From f7e6c400945ac47e05819e6bc6828a1f6a29757d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 27 Dec 2013 00:05:59 +0200 Subject: [PATCH] CppTools: Uncomment a test and fix it The bug was fixed long time ago, the test is missing a semicolon Change-Id: I0236048d2da059fe208591469fb69541705463cf Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/cppcompletion_test.cpp | 47 ++++++++++----------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index 8ed54b80575..4171cc7593f 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -707,30 +707,29 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("Final") << QLatin1String("Global")); - // This test does not work due to the bug QTCREATORBUG-7912 -// QTest::newRow("use_global_identifier_as_base_class: derived is enclosed by template. " -// "base as global") << _( -// "struct Global\n" -// "{\n" -// " int int_global;\n" -// "};\n" -// "\n" -// "template \n" -// "struct Enclosing\n" -// "{\n" -// "struct Final : ::Global\n" -// "{\n" -// " int int_final;\n" -// "};\n" -// "}\n" -// "\n" -// "Enclosing::Final c;\n" -// "@\n" -// ) << _("c.") << (QStringList() -// << QLatin1String("int_global") -// << QLatin1String("int_final") -// << QLatin1String("Final") -// << QLatin1String("Global")); + QTest::newRow("use_global_identifier_as_base_class: derived is enclosed by template. " + "base as global") << _( + "struct Global\n" + "{\n" + " int int_global;\n" + "};\n" + "\n" + "template \n" + "struct Enclosing\n" + "{\n" + "struct Final : ::Global\n" + "{\n" + " int int_final;\n" + "};\n" + "};\n" + "\n" + "Enclosing::Final c;\n" + "@\n" + ) << _("c.") << (QStringList() + << QLatin1String("int_global") + << QLatin1String("int_final") + << QLatin1String("Final") + << QLatin1String("Global")); QTest::newRow("base_class_has_name_the_same_as_derived: base class is derived class") << _( "struct A : A\n"