aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java b/src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java
index c56f0dddaf..a6857b7089 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/OutputGroupProviderTest.java
@@ -24,7 +24,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import java.util.HashSet;
import java.util.Set;
/**
@@ -43,18 +42,13 @@ public final class OutputGroupProviderTest {
@Test
public void testDetermineOutputGroupsAddsToDefaults() throws Exception {
Set<String> outputGroups = determineOutputGroups(ImmutableSet.of("x", "y", "z"), asList("+a"));
- Set<String> expected = new HashSet<>(ImmutableSet.of("x", "y", "z"));
- expected.add("a");
- assertThat(outputGroups).containsExactlyElementsIn(expected);
+ assertThat(outputGroups).containsExactly("x", "y", "z", "a");
}
@Test
public void testDetermineOutputGroupsRemovesFromDefaults() throws Exception {
Set<String> outputGroups = determineOutputGroups(ImmutableSet.of("x", "y", "z"), asList("-y"));
-
- Set<String> expected = new HashSet<>(ImmutableSet.of("x", "y", "z"));
- expected.remove("y");
- assertThat(outputGroups).containsExactlyElementsIn(expected);
+ assertThat(outputGroups).containsExactly("x", "z");
}
@Test
@@ -70,19 +64,17 @@ public final class OutputGroupProviderTest {
Set<String> outputGroups =
determineOutputGroups(ImmutableSet.of("x", "y", "z"), asList("-foo"));
// "foo" doesn't exist, but that shouldn't be a problem.
- assertThat(outputGroups).containsExactlyElementsIn(ImmutableSet.of("x", "y", "z"));
+ assertThat(outputGroups).containsExactly("x", "y", "z");
}
@Test
public void testDetermineOutputGroupsRemovesPreviouslyAddedGroup() throws Exception {
Set<String> outputGroups;
outputGroups = determineOutputGroups(ImmutableSet.of("x", "y", "z"), asList("+a", "-a"));
- assertThat(outputGroups).containsExactlyElementsIn(ImmutableSet.of("x", "y", "z"));
+ assertThat(outputGroups).containsExactly("x", "y", "z");
// Order matters here.
outputGroups = determineOutputGroups(ImmutableSet.of("x", "y", "z"), asList("-a", "+a"));
- Set<String> expected = new HashSet<>(ImmutableSet.of("x", "y", "z"));
- expected.add("a");
- assertThat(outputGroups).containsExactlyElementsIn(expected);
+ assertThat(outputGroups).containsExactly("x", "y", "z", "a");
}
}