summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppdoxygen_test.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-12-19 01:30:49 +0100
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-01-07 14:19:21 +0100
commitc7f3ac407394d3c4d7fe817a6a913cd3256c37e5 (patch)
treea3006da3814715ed01ebd7abe0e5856ba00f26f9 /src/plugins/cppeditor/cppdoxygen_test.cpp
parent5c8df5fa4ec4a8f30261dc4d53a810f7be65df51 (diff)
downloadqt-creator-c7f3ac407394d3c4d7fe817a6a913cd3256c37e5.tar.gz
CppEditor/CppTools: Clean up *Test* classes
* Unify class names * Fix coding style Change-Id: I7498192ba9e6b9fc0e97d3d4f0dbb30f1853a0c9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index 41d940e4cb..87b78c6a79 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -59,18 +59,18 @@ typedef QByteArray _;
* Encapsulates the whole process of setting up an editor,
* pressing ENTER and checking the result.
*/
-class TestCase : public CppEditor::Internal::Tests::TestCase
+class DoxygenTestCase : public CppEditor::Internal::Tests::TestCase
{
public:
- TestCase(const QByteArray &input);
- void run(const QByteArray &expected, int undoCount = 1);
+ DoxygenTestCase(const QByteArray &input);
+ void run(const QByteArray &expected);
private:
CppEditor::Internal::Tests::TestDocument testDocument;
};
/// The '|' in the input denotes the cursor position.
-TestCase::TestCase(const QByteArray &input)
+DoxygenTestCase::DoxygenTestCase(const QByteArray &input)
: testDocument("file.cpp", input, '|')
{
QVERIFY(testDocument.hasCursorMarker());
@@ -97,7 +97,7 @@ TestCase::TestCase(const QByteArray &input)
waitForRehighlightedSemanticDocument(testDocument.m_editorWidget);
}
-void TestCase::run(const QByteArray &expected, int undoCount)
+void DoxygenTestCase::run(const QByteArray &expected)
{
// Send 'ENTER' key press
QKeyEvent event(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
@@ -106,12 +106,12 @@ void TestCase::run(const QByteArray &expected, int undoCount)
QCOMPARE(QLatin1String(result), QLatin1String(expected));
- for (int i = 0; i < undoCount; ++i)
- testDocument.m_editorWidget->undo();
+ testDocument.m_editorWidget->undo();
const QByteArray contentsAfterUndo
= testDocument.m_editorWidget->document()->toPlainText().toUtf8();
QCOMPARE(contentsAfterUndo, testDocument.m_source);
}
+
} // anonymous namespace
void CppEditorPlugin::test_doxygen_comments_data()
@@ -257,6 +257,6 @@ void CppEditorPlugin::test_doxygen_comments()
{
QFETCH(QByteArray, given);
QFETCH(QByteArray, expected);
- TestCase data(given);
- data.run(expected);
+ DoxygenTestCase test(given);
+ test.run(expected);
}