Class SuppressWarningsPrefixTest

java.lang.Object
org.checkerframework.framework.source.SuppressWarningsPrefixTest

public class SuppressWarningsPrefixTest extends Object
Unit tests for SuppressWarningsPrefix inheritance across checker class hierarchies and propagation from parent checkers to subcheckers.
  • Constructor Details

    • SuppressWarningsPrefixTest

      public SuppressWarningsPrefixTest()
      Default constructor.
  • Method Details

    • testSuperclassPrefixInheritance

      public void testSuperclassPrefixInheritance()
      Tests that a subclass inherits prefixes declared on superclasses in the hierarchy.
    • testUnannotatedSubclassInheritsSuperclassPrefix

      public void testUnannotatedSubclassInheritsSuperclassPrefix()
      Tests that an unannotated subclass inherits prefixes from an annotated superclass.
    • testDefaultPrefixWhenNoAnnotation

      public void testDefaultPrefixWhenNoAnnotation()
      Tests that a checker with no annotation defaults to its class-derived prefix.
    • testParentCheckerPrefixPropagation

      public void testParentCheckerPrefixPropagation()
      Tests that a subchecker inherits the prefixes of its parent checker.
    • testSetParentCheckerInvalidation

      public void testSetParentCheckerInvalidation()
      Tests that setParentChecker invalidates cached prefixes on the subchecker.
    • testParentSuperclassPrefixPropagation

      public void testParentSuperclassPrefixPropagation()
      Tests that a subchecker inherits prefixes declared on superclasses of its parent checker.
    • testParentPrefixOverridingSuperclassForSubcheckers

      public void testParentPrefixOverridingSuperclassForSubcheckers()
      Tests that when a parent checker declares its own @SuppressWarningsPrefix, it overrides prefixes from its superclasses for propagation to subcheckers, avoiding prefix bleed.