MCPcopy Create free account
hub / github.com/KDE/kdevelop / overrideHelper

Method overrideHelper

plugins/astyle/tests/test_astyle.cpp:134–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void TestAstyle::overrideHelper()
135{
136 // think this:
137 // virtual void asdf();
138 // gets included into a class
139
140 // test1: not indented
141 QString formattedSource = m_formatter->formatSource(
142 QStringLiteral("virtual void asdf();"), QStringLiteral("class asdf {\n int bar();\n"), QStringLiteral("\n};")
143 );
144 qDebug() << "formatted source:" << formattedSource;
145 QCOMPARE(formattedSource, QString(" virtual void asdf();"));
146
147 // test2: already indented
148 formattedSource = m_formatter->formatSource(
149 QStringLiteral("virtual void asdf();"), QStringLiteral("class asdf {\n int bar();\n "), QStringLiteral("\n};")
150 );
151 qDebug() << "formatted source:" << formattedSource;
152 QCOMPARE(formattedSource, QString("virtual void asdf();"));
153}
154
155void TestAstyle::varTypeAssistant()
156{

Callers

nothing calls this directly

Calls 2

formatSourceMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected