Added support space symbols for diagnostic parameters in DiagnosticTest
This commit is contained in:
@@ -74,7 +74,7 @@ public class CheckerTestUtil {
|
||||
};
|
||||
|
||||
private static final String IGNORE_DIAGNOSTIC_PARAMETER = "IGNORE";
|
||||
private static final String DIAGNOSTIC_PARAMETER = "[^\\)\\(\\s;]+";
|
||||
private static final String DIAGNOSTIC_PARAMETER = "[^\\)\\(;]+";
|
||||
private static final String INDIVIDUAL_DIAGNOSTIC = "(\\w+)(\\(" + DIAGNOSTIC_PARAMETER + "(;\\s*" + DIAGNOSTIC_PARAMETER + ")*\\))?";
|
||||
private static final Pattern RANGE_START_OR_END_PATTERN = Pattern.compile("(<!"+
|
||||
INDIVIDUAL_DIAGNOSTIC +"(,\\s*"+
|
||||
@@ -586,7 +586,7 @@ public class CheckerTestUtil {
|
||||
List<String> parsedParameters = new SmartList<String>();
|
||||
Matcher parametersMatcher = INDIVIDUAL_PARAMETER_PATTERN.matcher(parameters);
|
||||
while (parametersMatcher.find())
|
||||
parsedParameters.add(parametersMatcher.group());
|
||||
parsedParameters.add(parametersMatcher.group().trim());
|
||||
return new TextDiagnostic(name, parsedParameters);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
trait Pa<X, Y>
|
||||
|
||||
fun foo(<!UNUSED_PARAMETER(IGNORE)!>u<!> : Unit) : Int = 1
|
||||
fun bas(<!UNUSED_PARAMETER!>u<!> : Pa<Int, String>) = 3
|
||||
|
||||
fun test() : Int {
|
||||
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH(IGNORE; kotlin.Unit)!>1<!>)
|
||||
val <!UNUSED_VARIABLE!>a<!> : () -> Unit = {
|
||||
foo(<!CONSTANT_EXPECTED_TYPE_MISMATCH(integer; IGNORE)!>1<!>)
|
||||
bas(<!CONSTANT_EXPECTED_TYPE_MISMATCH(integer; Pa<kotlin.Int, kotlin.String>)!>1<!>)
|
||||
}
|
||||
return 1 <!NONE_APPLICABLE!>-<!> "1"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package
|
||||
|
||||
internal fun bas(/*0*/ u: Pa<kotlin.Int, kotlin.String>): kotlin.Int
|
||||
internal fun foo(/*0*/ u: kotlin.Unit): kotlin.Int
|
||||
internal fun foo1(): kotlin.Unit
|
||||
internal fun test(): kotlin.Int
|
||||
@@ -10,4 +11,10 @@ internal final class A {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
internal trait Pa</*0*/ X, /*1*/ Y> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user