aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/syntax
diff options
context:
space:
mode:
authorGravatar Carmi Grushko <carmi@google.com>2015-11-10 17:19:13 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2015-11-11 13:07:36 +0000
commitfd8acab0fcd4586c7beab61145cc565701bc3009 (patch)
tree8ef529e52d7106e86d2c4f9aa6d50a86e46575d7 /src/test/java/com/google/devtools/build/lib/syntax
parent254024df7c4a655a269e3e49c0a600716f1aedee (diff)
Replace home-made assertions with equivalent Google Truth calls.
-- MOS_MIGRATED_REVID=107492955
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/syntax')
-rw-r--r--src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java b/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
index 000272bd2b..be325a31df 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
@@ -14,7 +14,6 @@
package com.google.devtools.build.lib.syntax;
import static com.google.common.truth.Truth.assertThat;
-import static com.google.devtools.build.lib.testutil.MoreAsserts.assertSameContents;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
@@ -181,17 +180,18 @@ public class TypeTest {
@Test
public void testTagConversion() throws Exception {
- assertSameContents(Sets.newHashSet("attribute"),
- Type.BOOLEAN.toTagSet(true, "attribute"));
- assertSameContents(Sets.newHashSet("noattribute"),
- Type.BOOLEAN.toTagSet(false, "attribute"));
-
- assertSameContents(Sets.newHashSet("whiskey"),
- Type.STRING.toTagSet("whiskey", "preferred_cocktail"));
-
- assertSameContents(Sets.newHashSet("cheddar", "ementaler", "gruyere"),
- Type.STRING_LIST.toTagSet(
- Lists.newArrayList("cheddar", "ementaler", "gruyere"), "cheeses"));
+ assertThat(Type.BOOLEAN.toTagSet(true, "attribute"))
+ .containsExactlyElementsIn(Sets.newHashSet("attribute"));
+ assertThat(Type.BOOLEAN.toTagSet(false, "attribute"))
+ .containsExactlyElementsIn(Sets.newHashSet("noattribute"));
+
+ assertThat(Type.STRING.toTagSet("whiskey", "preferred_cocktail"))
+ .containsExactlyElementsIn(Sets.newHashSet("whiskey"));
+
+ assertThat(
+ Type.STRING_LIST.toTagSet(
+ Lists.newArrayList("cheddar", "ementaler", "gruyere"), "cheeses"))
+ .containsExactlyElementsIn(Sets.newHashSet("cheddar", "ementaler", "gruyere"));
}
@Test