| 122 | } |
| 123 | |
| 124 | void TestBuddies::testDeclarationDefinitionOrder() |
| 125 | { |
| 126 | enableBuddies(); |
| 127 | enableOpenAfterCurrent(); |
| 128 | |
| 129 | QTemporaryDir tempDirA; |
| 130 | QDir dirA(tempDirA.path()); |
| 131 | createFile(dirA, QStringLiteral("a.cpp")); |
| 132 | createFile(dirA, QStringLiteral("b.cpp")); |
| 133 | createFile(dirA, QStringLiteral("c.cpp")); |
| 134 | createFile(dirA, QStringLiteral("a.h")); |
| 135 | createFile(dirA, QStringLiteral("b.h")); |
| 136 | createFile(dirA, QStringLiteral("c.h")); |
| 137 | |
| 138 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("a.cpp")))); |
| 139 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("b.h")))); |
| 140 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("c.cpp")))); |
| 141 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("b.cpp")))); |
| 142 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("a.h")))); |
| 143 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.filePath(QStringLiteral("c.h")))); |
| 144 | |
| 145 | Sublime::Area *area = m_uiController->activeArea(); |
| 146 | Sublime::AreaIndex* areaIndex = area->indexOf(toSublimeWindow(m_uiController->activeMainWindow())->activeView()); |
| 147 | QCOMPARE(m_documentController->openDocuments().count(), 6); |
| 148 | //QCOMPARE(m_uiController->documents().count(), 6); |
| 149 | QCOMPARE(areaIndex->viewCount(), 6); |
| 150 | |
| 151 | verifyFilename(areaIndex->views().value(0), QStringLiteral("a.h")); |
| 152 | verifyFilename(areaIndex->views().value(1), QStringLiteral("a.cpp")); |
| 153 | verifyFilename(areaIndex->views().value(2), QStringLiteral("b.h")); |
| 154 | verifyFilename(areaIndex->views().value(3), QStringLiteral("b.cpp")); |
| 155 | verifyFilename(areaIndex->views().value(4), QStringLiteral("c.h")); |
| 156 | verifyFilename(areaIndex->views().value(5), QStringLiteral("c.cpp")); |
| 157 | } |
| 158 | |
| 159 | void TestBuddies::testMultiDotFilenames() |
| 160 | { |
nothing calls this directly
no test coverage detected