forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14' into master
Change-Id: Id7ad82997873da828456a15c441620d93c6fc7e7
This commit is contained in:
@@ -1414,6 +1414,39 @@ void CppEditorPlugin::test_quickfix_data()
|
||||
<< CppQuickFixFactoryPtr(new InsertQtPropertyMembers)
|
||||
<< _("class C { @Q_PROPERTY(typeid foo READ foo) };\n")
|
||||
<< _();
|
||||
|
||||
QTest::newRow("convert to camel case: normal")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @lower_case_function();\n")
|
||||
<< _("void lowerCaseFunction();\n");
|
||||
QTest::newRow("convert to camel case: already camel case")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @camelCaseFunction();\n")
|
||||
<< _();
|
||||
QTest::newRow("convert to camel case: no underscores (lower case)")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @lowercasefunction();\n")
|
||||
<< _();
|
||||
QTest::newRow("convert to camel case: no underscores (upper case)")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @UPPERCASEFUNCTION();\n")
|
||||
<< _();
|
||||
QTest::newRow("convert to camel case: non-applicable underscore")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @m_a_member;\n")
|
||||
<< _("void m_aMember;\n");
|
||||
QTest::newRow("convert to camel case: upper case")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @UPPER_CASE_FUNCTION();\n")
|
||||
<< _("void upperCaseFunction();\n");
|
||||
QTest::newRow("convert to camel case: partially camel case already")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void mixed@_andCamelCase();\n")
|
||||
<< _("void mixedAndCamelCase();\n");
|
||||
QTest::newRow("convert to camel case: wild mix")
|
||||
<< CppQuickFixFactoryPtr(new ConvertToCamelCase(true))
|
||||
<< _("void @WhAt_TODO_hErE();\n")
|
||||
<< _("void WhAtTODOHErE();\n");
|
||||
}
|
||||
|
||||
void CppEditorPlugin::test_quickfix()
|
||||
|
||||
Reference in New Issue
Block a user