use of com.google.devtools.build.lib.packages.AggregatingAttributeMapper in project bazel by bazelbuild.
the class AggregatingAttributeMapperTest method testGetReachableLabelsWithDefaultValues.
@Test
public void testGetReachableLabelsWithDefaultValues() throws Exception {
Rule rule = scratchRule("a", "myrule", "cc_binary(name = 'myrule',", " srcs = [],", " malloc = select({", " '//conditions:a': None,", " }))");
AggregatingAttributeMapper mapper = AggregatingAttributeMapper.of(rule);
assertThat(mapper.getReachableLabels("malloc", true)).containsExactly(getDefaultMallocLabel(rule), Label.create("@//conditions", "a"));
}
Aggregations