| Index: mojom/mojom_parser/formatter/formatter_test.go
|
| diff --git a/mojom/mojom_parser/formatter/formatter_test.go b/mojom/mojom_parser/formatter/formatter_test.go
|
| index ae745a3ddff15d2ee7442d71900c66f9b0b7bc63..ff072f4d9ed53d78494a44d63088d5541635d66d 100644
|
| --- a/mojom/mojom_parser/formatter/formatter_test.go
|
| +++ b/mojom/mojom_parser/formatter/formatter_test.go
|
| @@ -109,3 +109,26 @@ interface InterfaceFoo { // Interface comment.
|
| t.Fatalf("\nExpected:\n%v\n\n*****\n\nActual:\n%v eof", original, actual)
|
| }
|
| }
|
| +
|
| +func TestFormatNoExtraFinalBlankLine(t *testing.T) {
|
| + original := `interface ImagePipe {
|
| + // Some comment.
|
| + FlushImages();
|
| +
|
| +};
|
| +`
|
| +
|
| + expected := `interface ImagePipe {
|
| + // Some comment.
|
| + FlushImages();
|
| +};
|
| +`
|
| + actual, err := FormatMojom("test.mojom", original)
|
| + if err != nil {
|
| + t.Fatalf("Parser was not supposed to fail: %s", err.Error())
|
| + }
|
| +
|
| + if expected != actual {
|
| + t.Fatalf("\nExpected:\n%v\n\n*****\n\nActual:\n%v eof", expected, actual)
|
| + }
|
| +}
|
|
|