[TD] Update diagnostics test data due to new test runners
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
This commit is contained in:
@@ -108,4 +108,4 @@ fun test10() {
|
||||
42
|
||||
}
|
||||
x.length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ fun test2() {
|
||||
catch (e: ExcA) {
|
||||
null
|
||||
}
|
||||
catch (e: ExcB) <!NI;TYPE_MISMATCH!>{
|
||||
<!OI;CONSTANT_EXPECTED_TYPE_MISMATCH!>10<!>
|
||||
catch (e: ExcB) <!TYPE_MISMATCH{NI}!>{
|
||||
<!CONSTANT_EXPECTED_TYPE_MISMATCH{OI}!>10<!>
|
||||
}<!>
|
||||
s<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
@@ -108,4 +108,4 @@ fun test10() {
|
||||
<!UNUSED_EXPRESSION!>42<!>
|
||||
}
|
||||
x.length
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -17,4 +17,4 @@ fun test1(s1: String?) {
|
||||
s.length
|
||||
}
|
||||
s.length
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ fun test1(s1: String?) {
|
||||
return
|
||||
}
|
||||
finally {
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
}
|
||||
<!DEBUG_INFO_SMARTCAST!>s<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -105,4 +105,4 @@ fun test6(s1: String?, s2: String?) {
|
||||
s.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
s1.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
s2.length
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -14,15 +14,15 @@ fun test1() {
|
||||
try {
|
||||
x = null
|
||||
} catch (e: Exception) {
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>x<!><!NI;UNSAFE_CALL!>.<!>length // smartcast shouldn't be allowed (OOME could happen after `x = null`)
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>x<!><!UNSAFE_CALL{NI}!>.<!>length // smartcast shouldn't be allowed (OOME could happen after `x = null`)
|
||||
throw e
|
||||
}
|
||||
finally {
|
||||
// smartcast shouldn't be allowed, `x = null` could've happened
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>x<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>x<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
}
|
||||
// smartcast shouldn't be allowed, `x = null` could've happened
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>x<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>x<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
}
|
||||
|
||||
// With old DFA of try/catch info about unsound smartcasts after try
|
||||
@@ -35,7 +35,7 @@ fun test2() {
|
||||
x = null
|
||||
} catch (e: Exception) {
|
||||
// BAD
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>x<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>x<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
}
|
||||
finally {
|
||||
x<!UNSAFE_CALL!>.<!>length
|
||||
@@ -51,7 +51,7 @@ fun test3() {
|
||||
} catch (e: Exception) {
|
||||
t2 = null
|
||||
}
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>t2<!><!NI;UNSAFE_CALL!>.<!>not() // wrong smartcast, NPE
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>t2<!><!UNSAFE_CALL{NI}!>.<!>not() // wrong smartcast, NPE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ fun test4() {
|
||||
try {
|
||||
t2 = null
|
||||
} finally { }
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>t2<!><!NI;UNSAFE_CALL!>.<!>not() // wrong smartcast, NPE
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>t2<!><!UNSAFE_CALL{NI}!>.<!>not() // wrong smartcast, NPE
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +81,10 @@ fun test5() {
|
||||
return
|
||||
}
|
||||
finally {
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s1<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s2<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s1<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s2<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
}
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s1<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s1<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST!>s2<!>.length
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ fun test6(s1: String?, s2: String?) {
|
||||
return
|
||||
}
|
||||
finally {
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
requireNotNull(s2)
|
||||
}
|
||||
<!OI;DEBUG_INFO_SMARTCAST!>s<!><!NI;UNSAFE_CALL!>.<!>length
|
||||
<!NI;DEBUG_INFO_SMARTCAST!>s1<!><!OI;UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{OI}!>s<!><!UNSAFE_CALL{NI}!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST{NI}!>s1<!><!UNSAFE_CALL{OI}!>.<!>length
|
||||
<!DEBUG_INFO_SMARTCAST!>s2<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,4 +32,4 @@ fun test2(): Map<Int, Int> = run {
|
||||
} catch (e: ExcA) {
|
||||
mapOf("" to "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ fun test1(): Map<Int, Int> = run {
|
||||
}
|
||||
|
||||
fun test2(): Map<Int, Int> = run {
|
||||
<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>try {
|
||||
<!TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>try {
|
||||
emptyMap()
|
||||
} catch (e: ExcA) {
|
||||
<!NI;TYPE_MISMATCH, OI;TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>mapOf(<!NI;TYPE_MISMATCH!>"" to ""<!>)<!>
|
||||
<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH{OI}, TYPE_MISMATCH{NI}!>mapOf(<!TYPE_MISMATCH{NI}!>"" to ""<!>)<!>
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user