aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-08-09 15:59:24 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-09 16:01:37 -0700
commitd0a3c5eb67320906e4b937df5434f0e673cb6dce (patch)
treebd53ecfb3e65235f83e18d2d56382fb1468d1e2c /src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java
parent39974a43abdd32e3a1acbc7da945b08da9983e4e (diff)
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
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/select/AggregatingAttributeMapperTest.java8
1 files changed, 2 insertions, 6 deletions
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());
}