From d6fce4428db80f8e5d369581baea415e202cfe62 Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Wed, 14 Oct 2015 10:08:25 +0000 Subject: Reimplement target pattern parsing in Skyframe. This is currently not hooked up, and we're passing (potentially) massive numbers of targets around. -- MOS_MIGRATED_REVID=105395404 --- .../com/google/devtools/build/lib/testutil/MoreAsserts.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/test/java/com/google/devtools/build/lib/testutil/MoreAsserts.java') diff --git a/src/test/java/com/google/devtools/build/lib/testutil/MoreAsserts.java b/src/test/java/com/google/devtools/build/lib/testutil/MoreAsserts.java index 3554e35c36..c8c0d7bf4c 100644 --- a/src/test/java/com/google/devtools/build/lib/testutil/MoreAsserts.java +++ b/src/test/java/com/google/devtools/build/lib/testutil/MoreAsserts.java @@ -24,6 +24,7 @@ import com.google.common.base.Joiner; import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -350,6 +351,16 @@ public class MoreAsserts { return assertContainsEvent(eventCollector, expectedEvent, EventKind.ALL_EVENTS); } + /** + * If the specified EventCollector does not contain an event which has + * 'expectedEvent' as a substring, an informative assertion fails. Otherwise + * the matching event is returned. + */ + public static Event assertContainsEvent(Iterable eventCollector, + String expectedEvent, EventKind kind) { + return assertContainsEvent(eventCollector, expectedEvent, ImmutableSet.of(kind)); + } + /** * If the specified EventCollector does not contain an event of a kind of 'kinds' which has * 'expectedEvent' as a substring, an informative assertion fails. Otherwise -- cgit v1.2.3