Class AinferResourceLeakAjavaGenerationTest


public class AinferResourceLeakAjavaGenerationTest extends AinferGeneratePerDirectoryTest
Tests RLC-specific inference features with the aid of ajava files. This test is the first pass on the test data, which generates the ajava files.

This does not run WPI; it just runs one round of type-checking with -Ainfer enabled.

IMPORTANT: The errors captured in the tests located in tests/ainfer-resourceleak/ are not relevant. The meaning of this test class is to test if the generated ajava files are similar to the expected ones. The errors on .java files must be ignored.

  • Constructor Details

    • AinferResourceLeakAjavaGenerationTest

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

    • getTestDirs

      public static String[] getTestDirs()
    • 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