Skip to content

Commit

Permalink
Broke the build with my last commit. This integration test was overly…
Browse files Browse the repository at this point in the history
… brittle because it asserted more than needed.
  • Loading branch information
alexeagle committed May 31, 2012
1 parent d06853b commit 4e70a2b
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -16,7 +16,6 @@

package com.google.errorprone;

import static com.google.errorprone.DiagnosticTestHelper.diagnosticLineAndColumn;
import static com.google.errorprone.DiagnosticTestHelper.diagnosticMessage;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.hasItem;
Expand Down Expand Up @@ -66,12 +65,11 @@ public void testShouldFailToCompileSourceFileWithError() throws Exception {
assertThat(outputStream.toString(), exitCode, is(1));

Matcher<Iterable<? super Diagnostic<JavaFileObject>>> matcher = hasItem(allOf(
diagnosticLineAndColumn(41L, 5L),
diagnosticMessage(containsString("Empty statement after if"))));
assertThat("Warning should be found. Diagnostics: " + diagnosticHelper.getDiagnostics(),
diagnosticHelper.getDiagnostics(), matcher);
}

@Test
public void testShouldSucceedCompileSourceFileWithMultipleTopLevelClasses() throws Exception {
ErrorProneCompiler compiler = new ErrorProneCompiler.Builder()
Expand Down

0 comments on commit 4e70a2b

Please sign in to comment.