Skip to content

Commit de2bad1

Browse files
sormurascushon
authored andcommitted
Fixed expected error message part. (#36)
1 parent 1db92d4 commit de2bad1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/test/java/com/google/googlejavaformat/java/FormatterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void testFormatNonJavaFiles() throws Exception {
144144

145145
// should fail because the file does not exist
146146
assertThat(main.format("Foo.java")).isNotEqualTo(0);
147-
assertThat(err.toString()).contains("could not read file: " + "Foo.java");
147+
assertThat(err.toString()).contains("Foo.java" + ": could not read file: ");
148148
}
149149

150150
@Test
@@ -241,23 +241,23 @@ public void lineCommentTrailingBlank() throws FormatterException {
241241
String expect = "class T {\n // asd\n\n int x;\n}\n";
242242
assertThat(output).isEqualTo(expect);
243243
}
244-
244+
245245
@Test
246246
public void noBlankAfterLineCommentWithInteriorBlankLine() throws FormatterException {
247247
String input = "class T {\n// asd \n\n// dsa \nint x;\n}";
248248
String output = new Formatter().formatSource(input);
249249
String expect = "class T {\n // asd\n\n // dsa\n int x;\n}\n";
250250
assertThat(output).isEqualTo(expect);
251251
}
252-
252+
253253
@Test
254254
public void badConstructor() throws FormatterException {
255255
String input = "class X { Y() {} }";
256256
String output = new Formatter().formatSource(input);
257257
String expect = "class X {\n Y() {}\n}\n";
258258
assertThat(output).isEqualTo(expect);
259259
}
260-
260+
261261
@Test
262262
public void voidMethod() throws FormatterException {
263263
String input = "class X { void Y() {} }";

0 commit comments

Comments
 (0)