[Test] Migrate tests of foreign annotations to new infrastructure
This commit includes:
- test runners for foreign annotation tests
- minor changes testdata related to changed directives syntax
- dropping tests with javac integration: old javac tests actually ran
compiler without javac because of bug in configuration, so some
nullability annotations features are not supported in javac mode.
It's fine to drop it since javac mode is not fully supported
by compiler
This commit is contained in:
committed by
TeamCityServer
parent
ef3d966d53
commit
660c438ebe
+33
@@ -0,0 +1,33 @@
|
||||
import org.jspecify.annotations.*;
|
||||
|
||||
@DefaultNonNull
|
||||
public class WildcardsWithDefault {
|
||||
public void noBoundsNotNull(A<?, ?, ?> a) {}
|
||||
public void noBoundsNullable(A<@Nullable ?, @Nullable ?, @Nullable ?> a) {}
|
||||
}
|
||||
|
||||
class A <T extends Object, E extends @Nullable Object, F extends @NullnessUnspecified Object> {}
|
||||
|
||||
@DefaultNonNull
|
||||
class Use {
|
||||
public static void main(
|
||||
A<Object, Object, Object> aNotNullNotNullNotNull,
|
||||
A<Object, Object, @Nullable Object> aNotNullNotNullNull,
|
||||
A<Object, @Nullable Object, Object> aNotNullNullNotNull,
|
||||
A<Object, @Nullable Object, @Nullable Object> aNotNullNullNull,
|
||||
WildcardsWithDefault b
|
||||
) {
|
||||
// jspecify_nullness_mismatch
|
||||
b.noBoundsNotNull(aNotNullNotNullNotNull);
|
||||
b.noBoundsNotNull(aNotNullNotNullNull);
|
||||
// jspecify_nullness_mismatch
|
||||
b.noBoundsNotNull(aNotNullNullNotNull);
|
||||
// jspecify_nullness_mismatch
|
||||
b.noBoundsNotNull(aNotNullNullNull);
|
||||
|
||||
b.noBoundsNullable(aNotNullNotNullNotNull);
|
||||
b.noBoundsNullable(aNotNullNotNullNull);
|
||||
b.noBoundsNullable(aNotNullNullNotNull);
|
||||
b.noBoundsNullable(aNotNullNullNull);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user