Class JUnit3TestNotRun

java.lang.Object
com.google.errorprone.bugpatterns.BugChecker
com.google.errorprone.bugpatterns.JUnit3TestNotRun
All Implemented Interfaces:
BugChecker.CompilationUnitTreeMatcher, Suppressible, Serializable

public final class JUnit3TestNotRun extends BugChecker implements BugChecker.CompilationUnitTreeMatcher
A bugpattern; see the associated summary.
See Also:
  • Constructor Details

    • JUnit3TestNotRun

      public JUnit3TestNotRun()
  • Method Details

    • matchCompilationUnit

      public Description matchCompilationUnit(com.sun.source.tree.CompilationUnitTree unused, VisitorState state)
      Specified by:
      matchCompilationUnit in interface BugChecker.CompilationUnitTreeMatcher
    • checkMethod

      public Optional<Description> checkMethod(com.sun.source.tree.MethodTree methodTree, com.google.common.collect.ImmutableSet<com.sun.tools.javac.code.Symbol.MethodSymbol> calledMethods, VisitorState state)
      Matches iff:
      • Method's name begins with misspelled variation of "test".
      • Method is public, returns void, and has no parameters.
      • Enclosing class is JUnit3 test (extends TestCase, has no @RunWith annotation, no @Test-annotated methods, and is not abstract).