Commit a8690b61 authored by Nikolai Kosjar's avatar Nikolai Kosjar

Cpp{Tools,Editor}: Tests: Use CppModelManager::document()

...instead CppModelManager::snapshot().document().

Change-Id: If79bc03d062d309bbf6d4b229255ba281cddf8d5
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent acbc4b9f
......@@ -1863,7 +1863,7 @@ QList<Include> includesForSource(const QByteArray &source)
pp.setIncludePaths(QStringList(TestIncludePaths::globalIncludePath()));
pp.run(fileName);
Document::Ptr document = cmm->snapshot().document(fileName);
Document::Ptr document = cmm->document(fileName);
return document->resolvedIncludes();
}
......
......@@ -269,7 +269,7 @@ void CppToolsPlugin::test_modelmanager_framework_headers()
QCoreApplication::processEvents();
QVERIFY(mm->snapshot().contains(source));
Document::Ptr doc = mm->snapshot().document(source);
Document::Ptr doc = mm->document(source);
QVERIFY(!doc.isNull());
CPlusPlus::Namespace *ns = doc->globalNamespace();
QVERIFY(ns);
......@@ -857,7 +857,7 @@ void CppToolsPlugin::test_modelmanager_defines_per_project()
while (sup->lastSemanticInfoDocument().isNull())
QCoreApplication::processEvents();
Document::Ptr doc = mm->snapshot().document(fileName);
Document::Ptr doc = mm->document(fileName);
QCOMPARE(nameOfFirstDeclaration(doc), firstDeclarationName);
}
}
......@@ -931,7 +931,7 @@ void CppToolsPlugin::test_modelmanager_defines_per_project_pch()
sup->snapshotUpdater()->setUsePrecompiledHeaders(true);
sup->snapshotUpdater()->update(mm->workingCopy());
Document::Ptr doc = mm->snapshot().document(fileName);
Document::Ptr doc = mm->document(fileName);
QCOMPARE(nameOfFirstDeclaration(doc), firstDeclarationName);
}
}
......@@ -1000,7 +1000,7 @@ void CppToolsPlugin::test_modelmanager_defines_per_editor()
sup->snapshotUpdater()->setEditorDefines(editorDefines.toUtf8());
sup->snapshotUpdater()->update(mm->workingCopy());
Document::Ptr doc = mm->snapshot().document(main1File);
Document::Ptr doc = mm->document(main1File);
QCOMPARE(nameOfFirstDeclaration(doc), firstDeclarationName);
}
}
......@@ -73,7 +73,7 @@ public:
pp.setIncludePaths(QStringList(TestIncludePaths::directoryOfTestFile()));
pp.run(fileName);
Document::Ptr document = m_cmm->snapshot().document(fileName);
Document::Ptr document = m_cmm->document(fileName);
QFile(fileName).remove();
return document;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment