[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
@@ -7,10 +7,10 @@ import checkSubtype
|
||||
|
||||
fun <T> id(t: T): T = t
|
||||
|
||||
fun <T> either(t1: T, <!UNUSED_PARAMETER!>t2<!>: T): T = t1
|
||||
fun <T> either(t1: T, t2: T): T = t1
|
||||
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>a<!>: Float = id(2.0.toFloat())
|
||||
val a: Float = id(2.0.toFloat())
|
||||
|
||||
val b = id(2.0)
|
||||
checkSubtype<Double>(b)
|
||||
@@ -21,5 +21,5 @@ fun test() {
|
||||
val d = either(11, 2.3)
|
||||
checkSubtype<Any>(d)
|
||||
|
||||
val <!UNUSED_VARIABLE!>e<!>: Float = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH{OI}, TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>id(1)<!>
|
||||
val e: Float = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH{OI}, TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>id(1)<!>
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ fun foo(i: Int) = i
|
||||
fun bar(l: Long) = l
|
||||
|
||||
fun main() {
|
||||
val <!UNUSED_VARIABLE!>i<!> = <!INT_LITERAL_OUT_OF_RANGE!>111111111111111777777777777777<!>
|
||||
val i = <!INT_LITERAL_OUT_OF_RANGE!>111111111111111777777777777777<!>
|
||||
|
||||
//todo add diagnostic text messages
|
||||
//report only 'The value is out of range'
|
||||
//not 'An integer literal does not conform to the expected type Int/Long'
|
||||
val <!UNUSED_VARIABLE!>l<!>: Long = <!INT_LITERAL_OUT_OF_RANGE!>1111111111111117777777777777777<!>
|
||||
val l: Long = <!INT_LITERAL_OUT_OF_RANGE!>1111111111111117777777777777777<!>
|
||||
foo(<!INT_LITERAL_OUT_OF_RANGE!>11111111111111177777777777777<!>)
|
||||
bar(<!INT_LITERAL_OUT_OF_RANGE, TYPE_MISMATCH{NI}!>11111111111111177777777777777<!>)
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ import checkSubtype
|
||||
|
||||
fun <T> id(t: T): T = t
|
||||
|
||||
fun <T> either(t1: T, <!UNUSED_PARAMETER!>t2<!>: T): T = t1
|
||||
fun <T> either(t1: T, t2: T): T = t1
|
||||
|
||||
fun other(<!UNUSED_PARAMETER!>s<!>: String) {}
|
||||
fun other(s: String) {}
|
||||
|
||||
fun <T> otherGeneric(<!UNUSED_PARAMETER!>l<!>: List<T>) {}
|
||||
fun <T> otherGeneric(l: List<T>) {}
|
||||
|
||||
fun test() {
|
||||
val a: Byte = id(1)
|
||||
|
||||
Reference in New Issue
Block a user