diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp index 4945fd8ae7f..b6f3033bfa2 100644 --- a/src/plugins/cppeditor/cppquickfix_test.cpp +++ b/src/plugins/cppeditor/cppquickfix_test.cpp @@ -256,6 +256,7 @@ QuickFixOperationTest::QuickFixOperationTest(const QListm_expectedSource); // Undo the change @@ -1720,6 +1721,23 @@ void CppEditorPlugin::test_quickfix_data() " f2(str);\n" "}\n"); + QTest::newRow("ConvertToPointerWithMacro") + << CppQuickFixFactoryPtr(new ConvertFromAndToPointer) + << _("#define BAR bar\n" + "void func()\n" + "{\n" + " int @foo = 42;\n" + " int bar;\n" + " BAR = foo;\n" + "}\n") + << _("#define BAR bar\n" + "void func()\n" + "{\n" + " int *foo = 42;\n" + " int bar;\n" + " BAR = *foo;\n" + "}\n"); + QTest::newRow("InsertQtPropertyMembers_noTriggerInvalidCode") << CppQuickFixFactoryPtr(new InsertQtPropertyMembers) << _("class C { @Q_PROPERTY(typeid foo READ foo) };\n")