forked from qt-creator/qt-creator
CppTools: Prioritize project parts with selectedForBuilding=true
...when selecting one for the editor document. This flag is only set by the QmakeProject. Change-Id: I648886e12148bd1ebeccca52d9faaf4b528597c9 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
David Schulz
parent
0718f536a7
commit
9861a58400
@@ -89,6 +89,20 @@ TEST_F(ProjectPartChooser, ForMultipleChooseFromActiveProject)
|
||||
ASSERT_THAT(chosen, Eq(secondProjectPart));
|
||||
}
|
||||
|
||||
TEST_F(ProjectPartChooser, ForMultiplePreferSelectedForBuilding)
|
||||
{
|
||||
const ProjectPart::Ptr firstProjectPart{new ProjectPart};
|
||||
const ProjectPart::Ptr secondProjectPart{new ProjectPart};
|
||||
firstProjectPart->selectedForBuilding = false;
|
||||
secondProjectPart->selectedForBuilding = true;
|
||||
projectPartsForFile += firstProjectPart;
|
||||
projectPartsForFile += secondProjectPart;
|
||||
|
||||
const ProjectPart::Ptr chosen = choose();
|
||||
|
||||
ASSERT_THAT(chosen, Eq(secondProjectPart));
|
||||
}
|
||||
|
||||
TEST_F(ProjectPartChooser, ForMultipleFromDependenciesChooseFromActiveProject)
|
||||
{
|
||||
const QList<ProjectPart::Ptr> projectParts = createProjectPartsWithDifferentProjects();
|
||||
|
||||
Reference in New Issue
Block a user