diff --git a/core/src/test/java/com/google/googlejavaformat/java/CommandLineOptionsParserTest.java b/core/src/test/java/com/google/googlejavaformat/java/CommandLineOptionsParserTest.java index 2b7f3af3a..08fbbbab3 100644 --- a/core/src/test/java/com/google/googlejavaformat/java/CommandLineOptionsParserTest.java +++ b/core/src/test/java/com/google/googlejavaformat/java/CommandLineOptionsParserTest.java @@ -20,7 +20,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Range; -import com.google.common.truth.Truth8; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -181,11 +180,11 @@ public void paramsFile() throws IOException { @Test public void assumeFilename() { - Truth8.assertThat( + assertThat( CommandLineOptionsParser.parse(Arrays.asList("--assume-filename", "Foo.java")) .assumeFilename()) .hasValue("Foo.java"); - Truth8.assertThat(CommandLineOptionsParser.parse(Arrays.asList("Foo.java")).assumeFilename()) + assertThat(CommandLineOptionsParser.parse(Arrays.asList("Foo.java")).assumeFilename()) .isEmpty(); } diff --git a/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolProviderTest.java b/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolProviderTest.java index 3fab11770..461bd6793 100644 --- a/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolProviderTest.java +++ b/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolProviderTest.java @@ -16,7 +16,6 @@ import static com.google.common.truth.Truth.assertThat; -import com.google.common.truth.Truth8; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ServiceLoader; @@ -33,7 +32,7 @@ public class GoogleJavaFormatToolProviderTest { public void testUsageOutputAfterLoadingViaToolName() { String name = "google-java-format"; - Truth8.assertThat( + assertThat( ServiceLoader.load(ToolProvider.class).stream() .map(ServiceLoader.Provider::get) .map(ToolProvider::name)) diff --git a/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolTest.java b/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolTest.java index e73b84cdb..e3a7573a7 100644 --- a/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolTest.java +++ b/core/src/test/java/com/google/googlejavaformat/java/GoogleJavaFormatToolTest.java @@ -17,7 +17,6 @@ import static com.google.common.truth.Truth.assertThat; import static java.nio.charset.StandardCharsets.UTF_8; -import com.google.common.truth.Truth8; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; @@ -35,7 +34,7 @@ public class GoogleJavaFormatToolTest { public void testUsageOutputAfterLoadingViaToolName() { String name = "google-java-format"; - Truth8.assertThat( + assertThat( ServiceLoader.load(Tool.class).stream() .map(ServiceLoader.Provider::get) .map(Tool::name)) diff --git a/core/src/test/java/com/google/googlejavaformat/java/TypeNameClassifierTest.java b/core/src/test/java/com/google/googlejavaformat/java/TypeNameClassifierTest.java index be47e9f4e..6d7e5666c 100644 --- a/core/src/test/java/com/google/googlejavaformat/java/TypeNameClassifierTest.java +++ b/core/src/test/java/com/google/googlejavaformat/java/TypeNameClassifierTest.java @@ -17,7 +17,6 @@ import static com.google.common.truth.Truth.assertThat; import com.google.common.base.Splitter; -import com.google.common.truth.Truth8; import com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat; import java.util.Optional; import org.junit.Test; @@ -52,26 +51,25 @@ private static Optional getPrefix(String qualifiedName) { @Test public void typePrefixLength() { - Truth8.assertThat(getPrefix("fieldName")).isEmpty(); - Truth8.assertThat(getPrefix("CONST")).isEmpty(); - Truth8.assertThat(getPrefix("ClassName")).hasValue(0); - Truth8.assertThat(getPrefix("com.ClassName")).hasValue(1); - Truth8.assertThat(getPrefix("ClassName.foo")).hasValue(1); - Truth8.assertThat(getPrefix("com.ClassName.foo")).hasValue(2); - Truth8.assertThat(getPrefix("ClassName.foo.bar")).hasValue(1); - Truth8.assertThat(getPrefix("com.ClassName.foo.bar")).hasValue(2); - Truth8.assertThat(getPrefix("ClassName.CONST")).hasValue(1); - Truth8.assertThat(getPrefix("ClassName.varName")).hasValue(1); - Truth8.assertThat(getPrefix("ClassName.Inner.varName")).hasValue(2); - Truth8.assertThat(getPrefix("com.R.foo")).hasValue(2); + assertThat(getPrefix("fieldName")).isEmpty(); + assertThat(getPrefix("CONST")).isEmpty(); + assertThat(getPrefix("ClassName")).hasValue(0); + assertThat(getPrefix("com.ClassName")).hasValue(1); + assertThat(getPrefix("ClassName.foo")).hasValue(1); + assertThat(getPrefix("com.ClassName.foo")).hasValue(2); + assertThat(getPrefix("ClassName.foo.bar")).hasValue(1); + assertThat(getPrefix("com.ClassName.foo.bar")).hasValue(2); + assertThat(getPrefix("ClassName.CONST")).hasValue(1); + assertThat(getPrefix("ClassName.varName")).hasValue(1); + assertThat(getPrefix("ClassName.Inner.varName")).hasValue(2); + assertThat(getPrefix("com.R.foo")).hasValue(2); } @Test public void ambiguousClass() { - Truth8.assertThat(getPrefix("com.google.security.acl.proto2api.ACL.Entry.newBuilder")) - .hasValue(7); + assertThat(getPrefix("com.google.security.acl.proto2api.ACL.Entry.newBuilder")).hasValue(7); // A human would probably identify this as "class-shaped", but just looking // at the case we have to assume it could be something like `field1.field2.CONST`. - Truth8.assertThat(getPrefix("com.google.security.acl.proto2api.ACL.newBuilder")).isEmpty(); + assertThat(getPrefix("com.google.security.acl.proto2api.ACL.newBuilder")).isEmpty(); } }