use of com.google.devtools.build.lib.packages.Aspect in project bazel by bazelbuild.
the class AspectCollectionTest method recursive.
/**
* a3 wants itself.
*/
@Test
public void recursive() throws Exception {
Aspect a1 = createAspect("a1");
Aspect a2 = createAspect("a2");
Aspect a3 = createAspect("a3", "a3");
AspectCollection collection = AspectCollection.create(ImmutableList.of(a1, a2, a3), ImmutableSet.of(a3.getDescriptor()));
validateAspectCollection(collection, ImmutableList.of(a3), ImmutableList.of(a3), expectDeps(a3));
}
use of com.google.devtools.build.lib.packages.Aspect in project bazel by bazelbuild.
the class AspectCollectionTest method linearAspectPath2.
/**
* a3 wants a2, a2 wants a1, a1 wants no one, path is a1, a2, a3.
*/
@Test
public void linearAspectPath2() throws Exception {
Aspect a1 = createAspect("a1");
Aspect a2 = createAspect("a2", "a1");
Aspect a3 = createAspect("a3", "a2");
AspectCollection collection = AspectCollection.create(ImmutableList.of(a1, a2, a3), ImmutableSet.of(a3.getDescriptor()));
validateAspectCollection(collection, ImmutableList.of(a1, a2, a3), ImmutableList.of(a3), expectDeps(a3, a2), expectDeps(a2, a1), expectDeps(a1));
}
Aggregations