Class ElementDefaultTargetLocationsTest

java.lang.Object
org.checkerframework.framework.test.junit.ElementDefaultTargetLocationsTest

public class ElementDefaultTargetLocationsTest extends Object
Tests that programmatic defaults registered for a location prohibited by the qualifier's TargetLocations meta-annotation are reported as type-system errors.
  • Constructor Details

    • ElementDefaultTargetLocationsTest

      public ElementDefaultTargetLocationsTest()
      Creates a new ElementDefaultTargetLocationsTest.
  • Method Details

    • disallowedCheckedDefaultIsATypeSystemError

      public void disallowedCheckedDefaultIsATypeSystemError()
      Tests that registering a checked code default for a location prohibited by @TargetLocations is reported as a type-system error.
    • disallowedUncheckedDefaultIsATypeSystemError

      public void disallowedUncheckedDefaultIsATypeSystemError()
      Tests that registering an unchecked code default for a location prohibited by @TargetLocations is reported as a type-system error.
    • disallowedElementDefaultIsATypeSystemError

      public void disallowedElementDefaultIsATypeSystemError()
      Tests that registering an element default for a location prohibited by @TargetLocations is reported as a type-system error.
    • programmaticAllowedDefaultSucceeds

      public void programmaticAllowedDefaultSucceeds()
      Tests that registering programmatic defaults on locations allowed by @ProgrammaticDefaultLocations succeeds without prohibited location errors.