[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
This commit is contained in:
committed by
TeamCityServer
parent
85949b387e
commit
cd890d5833
@@ -39,13 +39,13 @@ fun test4() {
|
||||
null
|
||||
}
|
||||
finally {
|
||||
<!UNUSED_EXPRESSION!>""<!>
|
||||
""
|
||||
}
|
||||
s<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
fun test5() {
|
||||
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>s<!>: String? =<!> try {
|
||||
<!UNREACHABLE_CODE!>val s: String? =<!> try {
|
||||
""
|
||||
}
|
||||
catch (e: ExcA) {
|
||||
@@ -105,7 +105,7 @@ fun test10() {
|
||||
val x = try {
|
||||
""
|
||||
} finally {
|
||||
<!UNUSED_EXPRESSION!>42<!>
|
||||
42
|
||||
}
|
||||
x.length
|
||||
}
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ class MyException : Exception() {
|
||||
}
|
||||
|
||||
fun test1() {
|
||||
val <!UNUSED_VARIABLE!>e<!> = "something"
|
||||
val e = "something"
|
||||
try {}
|
||||
catch (e: Exception) {
|
||||
e.message
|
||||
@@ -35,15 +35,15 @@ fun test3() {
|
||||
fun test4() {
|
||||
try {}
|
||||
catch (e: Exception) {
|
||||
val <!REDECLARATION, UNUSED_VARIABLE!>a<!> = 42
|
||||
val <!NAME_SHADOWING, REDECLARATION, UNUSED_VARIABLE!>a<!> = "foo"
|
||||
val <!REDECLARATION!>a<!> = 42
|
||||
val <!NAME_SHADOWING, REDECLARATION!>a<!> = "foo"
|
||||
}
|
||||
}
|
||||
|
||||
fun test5() {
|
||||
try {}
|
||||
catch (e: Exception) {
|
||||
val <!UNUSED_VARIABLE!>a<!>: Int = 42
|
||||
val a: Int = 42
|
||||
try {}
|
||||
catch (e: MyException) {
|
||||
e.myFun()
|
||||
@@ -51,4 +51,4 @@ fun test5() {
|
||||
a.length
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ fun test0(): List<Int> = run {
|
||||
try {
|
||||
emptyList()
|
||||
} finally {
|
||||
<!UNUSED_EXPRESSION!>""<!>
|
||||
""
|
||||
fun foo() {}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ fun test1(): Map<Int, Int> = run {
|
||||
} catch (e: ExcB) {
|
||||
e.map
|
||||
} finally {
|
||||
<!UNUSED_EXPRESSION!>""<!>
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user