Add when expression PSI spec tests
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 2
|
||||
* SENTENCE: [3] When expression has two different forms: with bound value and without it.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Empty 'when' with missed bound value.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when () {}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
KtFile: 3.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 2
|
||||
* SENTENCE: [3] When expression has two different forms: with bound value and without it.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Empty 'when' with missed 'when entries' section.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value)
|
||||
when ()
|
||||
when
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
KtFile: 3.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting '{'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiElement(RPAR)(')')
|
||||
PsiErrorElement:Expecting '{'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiErrorElement:Expecting '{'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 2
|
||||
* SENTENCE: [3] When expression has two different forms: with bound value and without it.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Empty 'when' with bound value.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
KtFile: 3.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 2
|
||||
* SENTENCE: [3] When expression has two different forms: with bound value and without it.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Empty 'when' without bound value.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when {}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
KtFile: 3.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 3
|
||||
* SENTENCE: [1] When expression without bound value (the form where the expression enclosed in parantheses is absent) evaluates one of the many different expressions based on corresponding conditions present in the same when entry.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' without bound value and missed control structure body.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when {
|
||||
value == 1 ->
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
KtFile: 1.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 3
|
||||
* SENTENCE: [1] When expression without bound value (the form where the expression enclosed in parantheses is absent) evaluates one of the many different expressions based on corresponding conditions present in the same when entry.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' without bound value and missed 'when condition'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when {
|
||||
-> { println(1) }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
KtFile: 1.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 3
|
||||
* SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' without bound value and with invalid 'else' branch.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when {
|
||||
else ->
|
||||
}
|
||||
when {
|
||||
else ->
|
||||
else ->
|
||||
}
|
||||
when {
|
||||
value == 1 -> println("1")
|
||||
value == 2 -> println("2")
|
||||
else ->
|
||||
}
|
||||
when {
|
||||
value == 1 -> println("!")
|
||||
else ->
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
KtFile: 2.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('1')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('2')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('!')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 3
|
||||
* SENTENCE: [2] Each entry consists of a boolean condition (or a special else condition), each of which is checked and evaluated in order of appearance.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' without bound value and with invalid list of the boolean conditions in 'when entry'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when {
|
||||
value == 21, -> return ""
|
||||
value is Int, value is String, -> return ""
|
||||
value in -100..100, value in value, -> return ""
|
||||
}
|
||||
when {
|
||||
value == 21, , -> return ""
|
||||
value is Int, ,value is String -> return ""
|
||||
value in -100..100, ,value in value -> return ""
|
||||
}
|
||||
when {
|
||||
, , -> return ""
|
||||
}
|
||||
when {
|
||||
, value == 21 -> return ""
|
||||
, value is Int, value is String -> return ""
|
||||
, value in -100..100, value in value -> return ""
|
||||
}
|
||||
when {
|
||||
value is Int value is String -> return ""
|
||||
value in -100..100 value in value -> return ""
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
@@ -0,0 +1,486 @@
|
||||
KtFile: 2.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('21')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('21')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(EQEQ)('==')
|
||||
PsiWhiteSpace(' ')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('21')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
IS_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting '->'
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiWhiteSpace(' ')
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('String')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(RANGE)('..')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('100')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(in)('in')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 6
|
||||
* SENTENCE: [1] When expression with bound value (the form where the expression enclosed in parantheses is present) are very similar to the form without bound value, but use different syntax for conditions.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and empty control structure body.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
1 ->
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
KtFile: 1.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 6
|
||||
* SENTENCE: [1] When expression with bound value (the form where the expression enclosed in parantheses is present) are very similar to the form without bound value, but use different syntax for conditions.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and empty 'when condition'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
-> { println(1) }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
KtFile: 1.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 6
|
||||
* SENTENCE: [1] When expression with bound value (the form where the expression enclosed in parantheses is present) are very similar to the form without bound value, but use different syntax for conditions.
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: 'When' with bound value and with invalid list of the conditions in 'when entry'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
-10000, value.getInt(11), Int.MIN_VALUE, -> return ""
|
||||
21, , -> return ""
|
||||
, , -> return ""
|
||||
, value.getInt(11) -> return ""
|
||||
value.getInt(11) Int.MIN_VALUE -> return ""
|
||||
value.getInt(11) 200 -> return ""
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
KtFile: 1.3.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(MINUS)('-')
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('10000')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('getInt')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('11')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiElement(DOT)('.')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('MIN_VALUE')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('21')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiErrorElement:Expecting a when-condition
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('getInt')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('11')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
BINARY_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('getInt')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('11')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(IDENTIFIER)('Int')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(DOT)('.')
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(IDENTIFIER)('MIN_VALUE')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
DOT_QUALIFIED_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(DOT)('.')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('getInt')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('11')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting '->'
|
||||
PsiElement(INTEGER_LITERAL)('200')
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 7
|
||||
* SENTENCE: [1] Type test condition: type checking operator followed by type.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and type test condition, but missed type in 'when condition'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
is -> return ""
|
||||
}
|
||||
when (value) {
|
||||
is -> return ""
|
||||
is -> return ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
KtFile: 1.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiErrorElement:Expecting a type
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiErrorElement:Expecting a type
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IS_PATTERN
|
||||
PsiElement(is)('is')
|
||||
PsiErrorElement:Expecting a type
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 7
|
||||
* SENTENCE: [1] Type test condition: type checking operator followed by type.
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and 'when condition' with type checking operator and non-type value.
|
||||
*/
|
||||
|
||||
fun case_2() {
|
||||
when (value) {
|
||||
is value -> return ""
|
||||
is value -> return ""
|
||||
is value.isEmpty() -> return ""
|
||||
}
|
||||
when (value) {
|
||||
is {} -> return ""
|
||||
is fun() {} -> return ""
|
||||
is 90 -> return ""
|
||||
is -.032 -> return ""
|
||||
is "..." -> return ""
|
||||
is '.' -> return ""
|
||||
is return 1 -> return ""
|
||||
is throw Exception() -> return ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
KtFile: 1.2.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiErrorElement:Expecting a top level declaration
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 7
|
||||
* SENTENCE: [3] Contains test condition: containment operator followed by an expression.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and 'when condition' with range expression, but without contains operator.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
in -> return ""
|
||||
}
|
||||
when (value) {
|
||||
in -> return ""
|
||||
in -> return ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
KtFile: 3.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_IN_RANGE
|
||||
OPERATION_REFERENCE
|
||||
PsiElement(in)('in')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 7
|
||||
* SENTENCE: [5] Any other expression.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and not allowed spread operator in 'when condition'.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
*value -> return ""
|
||||
*arrayOf("a", "b", "c") -> return ""
|
||||
*listOf(null, null, null) -> return ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
KtFile: 5.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting '->'
|
||||
PsiElement(MUL)('*')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting '->'
|
||||
PsiElement(MUL)('*')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('arrayOf')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('a')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('b')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('c')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting '->'
|
||||
PsiElement(MUL)('*')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('listOf')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
NULL
|
||||
PsiElement(null)('null')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
NULL
|
||||
PsiElement(null)('null')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace(' ')
|
||||
VALUE_ARGUMENT
|
||||
NULL
|
||||
PsiElement(null)('null')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
PsiErrorElement:Expecting an expression, is-condition or in-condition
|
||||
<empty list>
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
RETURN
|
||||
PsiElement(return)('return')
|
||||
PsiWhiteSpace(' ')
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* KOTLIN PSI SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: when-expression
|
||||
* PARAGRAPH: 7
|
||||
* SENTENCE: [7] The else condition, which works the exact same way as it would in the form without bound expression.
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with invalid else condition.
|
||||
*/
|
||||
|
||||
fun case_1() {
|
||||
when (value) {
|
||||
else ->
|
||||
}
|
||||
when (value) {
|
||||
else ->
|
||||
else ->
|
||||
}
|
||||
when (value) {
|
||||
1 -> println("1")
|
||||
2 -> println("2")
|
||||
else ->
|
||||
}
|
||||
when (value) {
|
||||
1 -> println("!")
|
||||
else ->
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
KtFile: 7.1.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('case_1')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('1')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('2')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('2')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN
|
||||
PsiElement(when)('when')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LPAR)('(')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('value')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
WHEN_CONDITION_WITH_EXPRESSION
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiWhiteSpace(' ')
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
VALUE_ARGUMENT_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
VALUE_ARGUMENT
|
||||
STRING_TEMPLATE
|
||||
PsiElement(OPEN_QUOTE)('"')
|
||||
LITERAL_STRING_TEMPLATE_ENTRY
|
||||
PsiElement(REGULAR_STRING_PART)('!')
|
||||
PsiElement(CLOSING_QUOTE)('"')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
WHEN_ENTRY
|
||||
PsiElement(else)('else')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ARROW)('->')
|
||||
PsiErrorElement:Expecting an element
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
+279
-23
@@ -50,7 +50,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInConstant_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(),
|
||||
new File("compiler/tests-spec/testData/psi/linked/constant-literals"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals")
|
||||
@@ -62,7 +64,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBoolean_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"),
|
||||
TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1")
|
||||
@@ -74,7 +78,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg")
|
||||
@@ -216,7 +222,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +377,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/boolean-literals/p-1/pos"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,7 +394,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInteger_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"),
|
||||
TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals")
|
||||
@@ -396,7 +408,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBinary_integer_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1")
|
||||
@@ -408,7 +422,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg")
|
||||
@@ -435,7 +451,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +501,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/binary-integer-literals/p-1/pos"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -498,7 +518,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDecimal_integer_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1")
|
||||
@@ -510,7 +532,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg")
|
||||
@@ -527,7 +551,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +586,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -574,7 +602,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_2() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg")
|
||||
@@ -596,7 +626,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -611,7 +643,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1")
|
||||
@@ -623,7 +657,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg")
|
||||
@@ -650,7 +686,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -693,7 +731,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,7 +748,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLong_integer_literals() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1")
|
||||
@@ -720,7 +762,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_1() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg")
|
||||
@@ -752,7 +796,9 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File(
|
||||
"compiler/tests-spec/testData/psi/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg"),
|
||||
Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -822,5 +868,215 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class When_expression extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInWhen_expression() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_2 extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_2() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("3.1.kt")
|
||||
public void test3_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg/3.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("3.2.kt")
|
||||
public void test3_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg/3.2.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Pos extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("3.1.kt")
|
||||
public void test3_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos/3.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("3.2.kt")
|
||||
public void test3_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos/3.2.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-3")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_3 extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_3() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("2.1.kt")
|
||||
public void test2_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/2.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("2.2.kt")
|
||||
public void test2_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg/2.2.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-6")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_6 extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_6() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.3.kt")
|
||||
public void test1_3() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg/1.3.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-7")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class P_7 extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInP_7() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Neg extends AbstractParsingTestSpec {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("1.1.kt")
|
||||
public void test1_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/1.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("1.2.kt")
|
||||
public void test1_2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/1.2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("3.1.kt")
|
||||
public void test3_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/3.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("5.1.kt")
|
||||
public void test5_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/5.1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("7.1.kt")
|
||||
public void test7_1() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg/7.1.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInNeg() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/when-expression/p-7/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user