From fd8acab0fcd4586c7beab61145cc565701bc3009 Mon Sep 17 00:00:00 2001 From: Carmi Grushko Date: Tue, 10 Nov 2015 17:19:13 +0000 Subject: Replace home-made assertions with equivalent Google Truth calls. -- MOS_MIGRATED_REVID=107492955 --- .../google/devtools/build/lib/syntax/TypeTest.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/syntax') 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 -- cgit v1.2.3