Changeset View
Changeset View
Standalone View
Standalone View
formatters/astyle/tests/test_astyle.cpp
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | 139 | { | |||
---|---|---|---|---|---|
155 | qDebug() << "formatted source:" << formattedSource; | 155 | qDebug() << "formatted source:" << formattedSource; | ||
156 | QCOMPARE(formattedSource, QString("virtual void asdf();")); | 156 | QCOMPARE(formattedSource, QString("virtual void asdf();")); | ||
157 | } | 157 | } | ||
158 | 158 | | |||
159 | void TestAstyle::varTypeAssistant() | 159 | void TestAstyle::varTypeAssistant() | ||
160 | { | 160 | { | ||
161 | // think this: | 161 | // think this: | ||
162 | // asdf = 1; | 162 | // asdf = 1; | ||
163 | // and you execute the assitant to get: | 163 | // and you execute the assistant to get: | ||
164 | // int asdf = 1; | 164 | // int asdf = 1; | ||
165 | 165 | | |||
166 | // test1: already indented | 166 | // test1: already indented | ||
167 | QString formattedSource = m_formatter->formatSource( | 167 | QString formattedSource = m_formatter->formatSource( | ||
168 | "int ", "int main() {\n ", "asdf = 1;\n}\n" | 168 | "int ", "int main() {\n ", "asdf = 1;\n}\n" | ||
169 | ); | 169 | ); | ||
170 | qDebug() << "formatted source:" << formattedSource; | 170 | qDebug() << "formatted source:" << formattedSource; | ||
171 | QCOMPARE(formattedSource, QString("int ")); | 171 | QCOMPARE(formattedSource, QString("int ")); | ||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |