Class AliasedCtorTest

java.lang.Object
org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest
org.checkerframework.framework.test.junit.AliasedCtorTest

public class AliasedCtorTest extends CheckerFrameworkPerDirectoryTest
Tests that a constructor's own explicit annotation, written using an alias rather than the canonical annotation, is recognized when computing the type of a constructor reference ( Foo::new), the same way the canonical annotation would be. See org.checkerframework.framework.type.AnnotatedTypeFactory#getResultingTypeOfConstructorMemberReference.
  • Constructor Details

    • AliasedCtorTest

      public AliasedCtorTest(List<File> testFiles)
      Parameters:
      testFiles - the files containing test code, which will be type-checked
  • Method Details

    • getTestDirs

      public static String[] getTestDirs()
      Define the test directories for this test.
      Returns:
      the test directories
    • resolveTestDirectory

      protected File resolveTestDirectory()
      Resolves the test root directory from the optional TestRootDirectory annotation or falls back to the default of currentDir/tests.
      Returns:
      the resolved directory
    • checkResult

      public void checkResult(TypecheckResult typecheckResult)
      Check that the TypecheckResult did not fail.
      Parameters:
      typecheckResult - result to check