Skip to content

Commit

Permalink
Now that Spotless fails the build when a formatter step throws an exc…
Browse files Browse the repository at this point in the history
…eption, this formerly sloppy test fails (as it should). Fixed it up.
  • Loading branch information
nedtwigg committed Apr 3, 2017
1 parent fe2b4f4 commit 8b29923
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
import org.junit.Test;

public class GoogleJavaFormatIntegrationTest extends GradleIntegrationTest {
// TODO: This test throws an exception because google-java-format-1.0 doesn't have
// RemoveUnusedImports.java (only 1.1+ does), but despite that, the test passes!
// Discover why this test passes and/or fix it or remove it.
@Test
public void integration() throws IOException {
write("build.gradle",
Expand All @@ -35,7 +32,7 @@ public void integration() throws IOException {
"spotless {",
" java {",
" target file('test.java')",
" googleJavaFormat('1.1')",
" googleJavaFormat('1.2')",
" }",
"}");
String input = getTestResource("java/googlejavaformat/JavaCodeUnformatted.test");
Expand All @@ -49,8 +46,8 @@ public void integration() throws IOException {
checkRunsThenUpToDate();

replace("build.gradle",
"googleJavaFormat('1.1')",
"googleJavaFormat('1.0')");
"googleJavaFormat('1.2')",
"googleJavaFormat('1.3')");
checkRunsThenUpToDate();
}
}

0 comments on commit 8b29923

Please sign in to comment.