use of com.google.devtools.build.lib.packages.SkylarkAspect in project bazel by bazelbuild.
the class SkylarkRuleClassFunctionsTest method aspectAllAttrs.
@Test
public void aspectAllAttrs() throws Exception {
evalAndExport("def _impl(target, ctx):", " pass", "my_aspect = aspect(_impl, attr_aspects=['*'])");
SkylarkAspect myAspect = (SkylarkAspect) lookup("my_aspect");
assertThat(myAspect.getDefinition(AspectParameters.EMPTY).propagateAlong(Attribute.attr("foo", BuildType.LABEL).allowedFileTypes().build())).isTrue();
}
Aggregations