use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.
the class ProjectCommandIntellijTest method testCreateTargetGraphWithTests.
@Test
public void testCreateTargetGraphWithTests() {
TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(), /* withTests = */
true, /* withDependenciesTests = */
true);
assertEquals(ImmutableSortedSet.<TargetNode<?, ?>>of(dummyRootBinNode, dummyProjectNode, fooProjectNode, fooBinNode, fooLibNode, fooBinTestNode, fooTestNode, barLibNode, bazProjectNode, bazLibNode, bazTestNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.
the class ProjectCommandIntellijTest method testCreateTargetGraphForSmallSliceWithoutTests.
@Test
public void testCreateTargetGraphForSmallSliceWithoutTests() {
TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(bazProjectNode.getBuildTarget()), /* withTests = */
false, /* withDependenciesTests = */
false);
assertEquals(ImmutableSortedSet.of(dummyRootBinNode, dummyProjectNode, bazProjectNode, bazLibNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.
the class ProjectCommandIntellijTest method testCreateTargetGraphWithoutTests.
@Test
public void testCreateTargetGraphWithoutTests() {
TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(), /* withTests = */
false, /* withDependenciesTests = */
false);
assertEquals(ImmutableSortedSet.<TargetNode<?, ?>>of(dummyRootBinNode, dummyProjectNode, fooProjectNode, fooBinNode, fooLibNode, barLibNode, bazProjectNode, bazLibNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.
the class ProjectCommandTests method generateWorkspacesForTargets.
public static Map<Path, ProjectGenerator> generateWorkspacesForTargets(TargetGraph targetGraph, ImmutableSet<BuildTarget> passedInTargetsSet, boolean isWithTests, boolean isWithDependenciesTests, boolean isReadonly, boolean isBuildWithBuck, boolean isCombinedProjects) throws IOException, InterruptedException {
TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.XCODE, passedInTargetsSet, isWithTests, isWithDependenciesTests);
Map<Path, ProjectGenerator> projectGenerators = new HashMap<>();
ProjectCommand.generateWorkspacesForTargets(ProjectCommandTests.createCommandRunnerParamsForTests(), targetGraphAndTargets, passedInTargetsSet, ProjectCommand.buildWorkspaceGeneratorOptions(isReadonly, isWithTests, isWithDependenciesTests, isCombinedProjects, true, /* shouldUseHeaderMaps */
false, /* shouldMergeHeaderMaps */
false), ImmutableList.of(), Optional.empty(), projectGenerators, isBuildWithBuck, isCombinedProjects);
return projectGenerators;
}
use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.
the class ProjectCommandXcodeTest method testCreateTargetGraphForSmallSliceWithoutTests.
@Test
public void testCreateTargetGraphForSmallSliceWithoutTests() {
TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.XCODE, ImmutableSet.of(smallWorkspaceNode.getBuildTarget()), /* withTests = */
false, /* withDependenciesTests */
false);
assertEquals(ImmutableSortedSet.of(smallWorkspaceNode, bazLibNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
Aggregations