/
AinferNullnessAjavaValidationTest.java
37 lines (33 loc) · 1.19 KB
/
AinferNullnessAjavaValidationTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.checkerframework.checker.test.junit.ainferrunners;
import java.io.File;
import java.util.List;
import org.checkerframework.checker.nullness.NullnessChecker;
import org.checkerframework.framework.test.AinferValidatePerDirectoryTest;
import org.junit.experimental.categories.Category;
import org.junit.runners.Parameterized.Parameters;
/**
* Tests whole-program type inference with ajava files. This test is the second pass, which ensures
* that with the ajava files in place, the errors that those annotations remove are no longer
* issued.
*/
@Category(AinferNullnessAjavaTest.class)
public class AinferNullnessAjavaValidationTest extends AinferValidatePerDirectoryTest {
/**
* @param testFiles the files containing test code, which will be type-checked
*/
public AinferNullnessAjavaValidationTest(List<File> testFiles) {
super(
testFiles,
NullnessChecker.class,
"nullness",
"ainfer-nullness/annotated",
AinferNullnessAjavaTest.class,
"-Anomsgtext",
ajavaArgFromFiles(testFiles, "nullness"),
"-Awarns");
}
@Parameters
public static String[] getTestDirs() {
return new String[] {"ainfer-nullness/annotated/"};
}
}