Get rid of ParametersAreNonnullByDefault copy in test data

This commit is contained in:
Denis Zharkov
2017-09-14 14:00:31 +03:00
parent 24b1f2ed1f
commit 6336ad874b
9 changed files with 13 additions and 29 deletions
@@ -1,28 +0,0 @@
package javax.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.meta.TypeQualifierDefault;
/**
* This annotation can be applied to a package, class or method to indicate that
* the method parameters in that element are nonnull by default unless there is:
* <ul>
* <li>An explicit nullness annotation
* <li>The method overrides a method in a superclass (in which case the
* annotation of the corresponding parameter in the superclass applies)
* <li>There is a default parameter annotation (like {@link ParametersAreNullableByDefault})
* applied to a more tightly nested element.
* </ul>
*
* @see Nonnull
*/
@Documented
@Nonnull
@TypeQualifierDefault(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface ParametersAreNonnullByDefault {
}
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305-annotations=enable
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305-annotations=ignore
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305-annotations=warn
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305=ignore
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,4 +1,5 @@
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305=strict
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
+1
View File
@@ -1,5 +1,6 @@
-Xjsr305=warn
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
$FOREIGN_ANNOTATIONS_DIR$
-d
$TEMP_DIR$
@@ -24,6 +24,7 @@ import kotlin.collections.CollectionsKt;
import kotlin.io.FilesKt;
import kotlin.text.Charsets;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.checkers.AbstractForeignAnnotationsTestKt;
import org.jetbrains.kotlin.cli.common.CLITool;
import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.js.K2JSCompiler;
@@ -162,7 +163,11 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
return argsWithColonsReplaced
.replace("$TEMP_DIR$", tempDir)
.replace("$TESTDATA_DIR$", new File(argsFilePath).getParent());
.replace("$TESTDATA_DIR$", new File(argsFilePath).getParent())
.replace(
"$FOREIGN_ANNOTATIONS_DIR$",
new File(AbstractForeignAnnotationsTestKt.getFOREIGN_ANNOTATIONS_SOURCES_PATH()).getPath()
);
});
}