CppEditor: Move FollowSymbolTest into the Tests namespace

This is now possible, as there is no ambiguity anymore regarding the
TestDocument class.

Change-Id: I6f736a5790d2eab1c82f5429a9292aa9d7bcda56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-08-27 16:00:33 +02:00
parent 5fe3ead73e
commit 49211c4a5c
3 changed files with 8 additions and 14 deletions

View File

@@ -402,10 +402,10 @@ QVector<QObject *> CppEditorPlugin::createTestObjects() const
{
return {
#ifdef WITH_TESTS
new FollowSymbolTest,
new Tests::AutoCompleterTest,
new Tests::DoxygenTest,
new Tests::FileAndTokenActionsTest,
new Tests::FollowSymbolTest,
new Tests::IncludeHierarchyTest,
new Tests::InsertVirtualMethodsTest,
new Tests::QuickfixTest,

View File

@@ -123,8 +123,7 @@ QT_END_NAMESPACE
typedef QByteArray _;
namespace CppEditor {
namespace Internal {
namespace CppEditor::Internal::Tests {
/// A fake virtual functions assist provider that runs processor->perform() already in configure()
class VirtualFunctionTestAssistProvider : public VirtualFunctionAssistProvider
@@ -546,13 +545,11 @@ TestDocumentPtr F2TestCase::testFileWithTargetCursorMarker(const QList<TestDocum
return TestDocumentPtr();
}
} // namespace Internal
} // namespace CppEditor
} // namespace CppEditor::Internal::Tests
Q_DECLARE_METATYPE(QList<CppEditor::Internal::TestDocumentPtr>)
Q_DECLARE_METATYPE(QList<CppEditor::Internal::Tests::TestDocumentPtr>)
namespace CppEditor {
namespace Internal {
namespace CppEditor::Internal::Tests {
void FollowSymbolTest::initTestCase()
{
@@ -2080,8 +2077,7 @@ void FollowSymbolTest::testFollowVirtualFunctionCallMultipleDocuments()
F2TestCase(F2TestCase::FollowSymbolUnderCursorAction, testFiles, finalResults);
}
} // namespace Internal
} // namespace CppEditor
} // namespace CppEditor::Internal::Tests
/*
Potential test cases improving name lookup.

View File

@@ -27,9 +27,7 @@
#include <QObject>
// Can't use Tests namespace because someone had the clever idea to create two
// non-local TestDocument classes in this plugin.
namespace CppEditor::Internal {
namespace CppEditor::Internal::Tests {
class FollowSymbolTest : public QObject
{
@@ -71,4 +69,4 @@ private slots:
void testFollowVirtualFunctionCallMultipleDocuments();
};
} // namespace CppEditor::Internal
} // namespace CppEditor::Internal::Tests