[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:
Dmitriy Novozhilov
2020-12-22 16:08:14 +03:00
committed by TeamCityServer
parent ef3d966d53
commit 660c438ebe
176 changed files with 2451 additions and 2970 deletions
@@ -0,0 +1,33 @@
import org.jspecify.annotations.*;
@DefaultNonNull
public class Simple {
@Nullable public Derived field = null;
@Nullable
public Derived foo(Derived x, @NullnessUnspecified Base y) {
return null;
}
public Derived bar() {
return null;
}
}
class Base {}
class Derived extends Base {
void foo() {}
}
@DefaultNonNull
class Use {
static public void main(Simple a, Derived x) {
a.foo(x, null).foo();
// jspecify_nullness_mismatch
a.foo(null, x).foo();
a.bar().foo();
a.field.foo();
}
}