forked from qt-creator/qt-creator
CppEditor: Add a failing test for ConvertToPointer with macro
Task-number: QTCREATORBUG-14801 Change-Id: Ie34b131de4e6f701aeac29567a09be54e2e63bd8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
dae0265d43
commit
b1e0731d55
@@ -256,6 +256,7 @@ QuickFixOperationTest::QuickFixOperationTest(const QList<QuickFixTestDocument::P
|
||||
removeTrailingWhitespace(result);
|
||||
if (!expectedFailMessage.isEmpty())
|
||||
QEXPECT_FAIL("", expectedFailMessage.data(), Continue);
|
||||
QEXPECT_FAIL("ConvertToPointerWithMacro", "QTCREATORBUG-14801", Abort);
|
||||
QCOMPARE(result, testDocument->m_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")
|
||||
|
||||
Reference in New Issue
Block a user