use of com.google.devtools.build.lib.packages.ImplicitOutputsFunction in project bazel by bazelbuild.
the class SkylarkRuleClassFunctionsTest method testRuleOutputs.
@Test
public void testRuleOutputs() throws Exception {
evalAndExport("def impl(ctx): return None", "r1 = rule(impl, outputs = {'a': 'a.txt'})");
RuleClass c = ((RuleFunction) lookup("r1")).getRuleClass();
ImplicitOutputsFunction function = c.getDefaultImplicitOutputsFunction();
assertEquals("a.txt", Iterables.getOnlyElement(function.getImplicitOutputs(null)));
}
Aggregations