Add cli tests on different options of -Xjsr305 flag

This commit is contained in:
Denis Zharkov
2017-09-14 11:22:15 +03:00
parent 363d345752
commit 97fed6336b
8 changed files with 45 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
-Xjsr305=ignore
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
-d
$TEMP_DIR$
+1
View File
@@ -0,0 +1 @@
OK
+5
View File
@@ -0,0 +1,5 @@
-Xjsr305=strict
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
-d
$TEMP_DIR$
+4
View File
@@ -0,0 +1,4 @@
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null can not be a value of a non-null type String
a.foo(null)
^
COMPILATION_ERROR
+3
View File
@@ -0,0 +1,3 @@
fun bar(a: A) {
a.foo(null)
}
+5
View File
@@ -0,0 +1,5 @@
-Xjsr305=warn
$TESTDATA_DIR$/jsr305Usage.kt
$TESTDATA_DIR$/jsr305
-d
$TEMP_DIR$
+4
View File
@@ -0,0 +1,4 @@
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: warning: expected type does not accept nulls in Java, but the value may be null in Kotlin
a.foo(null)
^
OK