Search in sources :

Example 11 with FixedTargetNodeTranslator

use of com.facebook.buck.versions.FixedTargetNodeTranslator in project buck by facebook.

the class NeededCoverageSpecTest method untranslatedTargets.

@Test
public void untranslatedTargets() {
    BuildTarget target = BuildTargetFactory.newInstance("//:rule");
    TargetNodeTranslator translator = new FixedTargetNodeTranslator(ImmutableMap.of());
    NeededCoverageSpec spec = NeededCoverageSpec.of(1.0f, target, Optional.empty());
    assertThat(translator.translate(CELL_PATH_RESOLVER, PATTERN, spec), Matchers.equalTo(Optional.empty()));
}
Also used : BuildTarget(com.facebook.buck.model.BuildTarget) FixedTargetNodeTranslator(com.facebook.buck.versions.FixedTargetNodeTranslator) TargetNodeTranslator(com.facebook.buck.versions.TargetNodeTranslator) FixedTargetNodeTranslator(com.facebook.buck.versions.FixedTargetNodeTranslator) Test(org.junit.Test)

Aggregations

BuildTarget (com.facebook.buck.model.BuildTarget)11 FixedTargetNodeTranslator (com.facebook.buck.versions.FixedTargetNodeTranslator)11 TargetNodeTranslator (com.facebook.buck.versions.TargetNodeTranslator)11 Test (org.junit.Test)11 DefaultBuildTargetSourcePath (com.facebook.buck.rules.DefaultBuildTargetSourcePath)4 Arg (com.facebook.buck.rules.args.Arg)1