Search in sources :

Example 11 with TargetGraphAndTargets

use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.

the class ProjectCommandIntellijTest method testCreateTargetGraphForSliceWithTests.

@Test
public void testCreateTargetGraphForSliceWithTests() {
    TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(fooProjectNode.getBuildTarget()), /* withTests = */
    true, /* withDependenciesTests = */
    true);
    assertEquals(ImmutableSortedSet.<TargetNode<?, ?>>of(dummyRootBinNode, dummyProjectNode, fooProjectNode, fooBinNode, fooLibNode, fooBinTestNode, fooTestNode, barLibNode, bazProjectNode, bazLibNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
Also used : TargetGraphAndTargets(com.facebook.buck.rules.TargetGraphAndTargets) Test(org.junit.Test)

Example 12 with TargetGraphAndTargets

use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.

the class ProjectCommandIntellijTest method testCreateTargetGraphForSmallSliceWithTests.

@Test
public void testCreateTargetGraphForSmallSliceWithTests() {
    TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(bazProjectNode.getBuildTarget()), /* withTests = */
    true, /* withDependenciesTests = */
    true);
    assertEquals(ImmutableSortedSet.of(dummyRootBinNode, dummyProjectNode, bazProjectNode, bazLibNode, bazTestNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
Also used : TargetGraphAndTargets(com.facebook.buck.rules.TargetGraphAndTargets) Test(org.junit.Test)

Example 13 with TargetGraphAndTargets

use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.

the class ProjectCommandIntellijTest method testCreateTargetGraphForSliceWithoutTests.

@Test
public void testCreateTargetGraphForSliceWithoutTests() {
    TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.INTELLIJ, ImmutableSet.of(fooProjectNode.getBuildTarget()), /* withTests = */
    false, /* withDependenciesTests = */
    false);
    assertEquals(ImmutableSortedSet.<TargetNode<?, ?>>of(dummyRootBinNode, dummyProjectNode, fooProjectNode, fooBinNode, fooLibNode, barLibNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
Also used : TargetGraphAndTargets(com.facebook.buck.rules.TargetGraphAndTargets) Test(org.junit.Test)

Example 14 with TargetGraphAndTargets

use of com.facebook.buck.rules.TargetGraphAndTargets in project buck by facebook.

the class ProjectCommandXcodeTest method testCreateTargetGraphWithTests.

@Test
public void testCreateTargetGraphWithTests() {
    TargetGraphAndTargets targetGraphAndTargets = ProjectCommandTests.createTargetGraph(targetGraph, ProjectCommand.Ide.XCODE, ImmutableSet.of(), /* withTests = */
    true, /* withDependenciesTests */
    true);
    assertEquals(ImmutableSortedSet.<TargetNode<?, ?>>of(workspaceNode, fooBinNode, fooBinBinaryNode, fooLibNode, fooBinTestNode, fooTestNode, barLibNode, smallWorkspaceNode, bazLibNode, bazTestNode, workspaceExtraTestNode), ImmutableSortedSet.copyOf(targetGraphAndTargets.getTargetGraph().getNodes()));
}
Also used : TargetGraphAndTargets(com.facebook.buck.rules.TargetGraphAndTargets) Test(org.junit.Test)

Aggregations

TargetGraphAndTargets (com.facebook.buck.rules.TargetGraphAndTargets)14 Test (org.junit.Test)12 ProjectGenerator (com.facebook.buck.apple.project_generator.ProjectGenerator)1 BuildFileParseException (com.facebook.buck.json.BuildFileParseException)1 BuildTarget (com.facebook.buck.model.BuildTarget)1 BuildTargetException (com.facebook.buck.model.BuildTargetException)1 UnflavoredBuildTarget (com.facebook.buck.model.UnflavoredBuildTarget)1 ParserConfig (com.facebook.buck.parser.ParserConfig)1 TargetGraph (com.facebook.buck.rules.TargetGraph)1 HumanReadableException (com.facebook.buck.util.HumanReadableException)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 Path (java.nio.file.Path)1 HashMap (java.util.HashMap)1