From d0a3c5eb67320906e4b937df5434f0e673cb6dce Mon Sep 17 00:00:00 2001 From: janakr Date: Thu, 9 Aug 2018 15:59:24 -0700 Subject: Batch all DependencyResolver#getTarget calls. This leads to some duplicate iteration, but that should be cheap, while requesting packages sequentially can hurt... PiperOrigin-RevId: 208126130 --- .../build/lib/analysis/select/AggregatingAttributeMapperTest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java') diff --git a/src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java b/src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java index a8f912602c..073c751766 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java @@ -146,9 +146,7 @@ public class AggregatingAttributeMapperTest extends AbstractAttributeMapperTest " '" + BuildType.Selector.DEFAULT_CONDITION_KEY + "': ['default.sh'],", " }))"); - VisitationRecorder recorder = new VisitationRecorder("srcs"); - AggregatingAttributeMapper.of(rule).visitLabels(recorder); - assertThat(recorder.labelsVisited) + assertThat(getLabelsForAttribute(AggregatingAttributeMapper.of(rule), "srcs")) .containsExactlyElementsIn( ImmutableList.of( "//a:a.sh", "//a:b.sh", "//a:default.sh", "//conditions:a", "//conditions:b")); @@ -163,9 +161,7 @@ public class AggregatingAttributeMapperTest extends AbstractAttributeMapperTest " '//conditions:a': None,", " }))"); - VisitationRecorder recorder = new VisitationRecorder("malloc"); - AggregatingAttributeMapper.of(rule).visitLabels(recorder); - assertThat(recorder.labelsVisited) + assertThat(getLabelsForAttribute(AggregatingAttributeMapper.of(rule), "malloc")) .containsExactly("//conditions:a", getDefaultMallocLabel(rule).toString()); } -- cgit v1.2.3