Skip to content

Commit

Permalink
Kill another mutant and drop unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Feb 21, 2023
1 parent 92bc3e1 commit c4ae95f
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,28 @@ void noBugPatternTest(@TempDir Path outputDirectory) {
assertThat(outputDirectory.toAbsolutePath()).isEmptyDirectory();
}

@Test
void bugPatternTestFileWithoutTestSuffix(@TempDir Path outputDirectory) {
Compilation.compileWithDocumentationGenerator(
outputDirectory,
"TestCheckerWithWrongSuffix.java",
"import com.google.errorprone.bugpatterns.BugChecker;",
"import com.google.errorprone.CompilationTestHelper;",
"",
"final class TestCheckerWithWrongSuffix {",
" private static class TestChecker extends BugChecker {}",
"",
" CompilationTestHelper compilationTestHelper = CompilationTestHelper.newInstance(TestChecker.class, getClass());",
"}");

assertThat(outputDirectory.toAbsolutePath()).isEmptyDirectory();
}

@Test
void minimalBugPatternTest(@TempDir Path outputDirectory) throws IOException {
Compilation.compileWithDocumentationGenerator(
outputDirectory,
"TestCheckerTest.java",
"import com.google.errorprone.BugCheckerRefactoringTestHelper;",
"import com.google.errorprone.bugpatterns.BugChecker;",
"import com.google.errorprone.CompilationTestHelper;",
"",
Expand All @@ -49,7 +65,6 @@ void differentBugPatternAsClassVariableTest(@TempDir Path outputDirectory) {
Compilation.compileWithDocumentationGenerator(
outputDirectory,
"TestCheckerTest.java",
"import com.google.errorprone.BugCheckerRefactoringTestHelper;",
"import com.google.errorprone.bugpatterns.BugChecker;",
"import com.google.errorprone.CompilationTestHelper;",
"",
Expand Down

0 comments on commit c4ae95f

Please sign in to comment.