[Spec tests] Remove spec info from fir tests
This commit is contained in:
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Non-exhaustive when, without bound value, without else branch.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String = when {
|
||||
value_1 == 1 -> ""
|
||||
|
||||
-9
@@ -1,15 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Non-exhaustive when, with bound value, without else branch.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String = when (value_1) {
|
||||
1 -> ""
|
||||
|
||||
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Non-exhaustive when using nullable boolean values.
|
||||
*/
|
||||
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Boolean?): String = when(value_1) {
|
||||
true -> ""
|
||||
|
||||
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Non-exhaustive when using subclasses of the nullable sealed class.
|
||||
* HELPERS: sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass?): String = when(value_1) {
|
||||
is SealedChild1 -> ""
|
||||
|
||||
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: Non-exhaustive when using nullable enum values.
|
||||
* HELPERS: enumClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: EnumClass?): String = when(value_1) {
|
||||
EnumClass.EAST -> ""
|
||||
|
||||
-9
@@ -1,15 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Non-exhaustive when using boolean values.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Boolean): String = when(value_1) {
|
||||
true -> ""
|
||||
|
||||
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Non-exhaustive when using subclasses of the sealed class.
|
||||
* HELPERS: sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass): String = when(value_1) {
|
||||
is SealedChild1 -> ""
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: Exhaustive when, with bound value (sealed, enum, boolean), with redundant else branch.
|
||||
* HELPERS: enumClasses, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: EnumClass): String = when (value_1) {
|
||||
EnumClass.EAST -> ""
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Exhaustive when using nullable enum values.
|
||||
* HELPERS: enumClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: EnumClass?): String = when (value_1) {
|
||||
EnumClass.EAST -> ""
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 10
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: Exhaustive when using subclasses of the nullable sealed class.
|
||||
* HELPERS: sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass?): Int = when (value_1) {
|
||||
is SealedChild1 -> value_1.number
|
||||
|
||||
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Exhaustive when using subclasses of the sealed class.
|
||||
* HELPERS: sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass): Int = when (value_1) {
|
||||
is SealedChild1 -> value_1.number
|
||||
|
||||
Vendored
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 1 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Empty when with bound value.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int) {
|
||||
when (value_1) {}
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: When with non-boolean value in the when condition.
|
||||
* HELPERS: typesProvider
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int, value_2: String, value_3: TypesProvider): String {
|
||||
when {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 2
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: When without bound value, forbidden comma in the when condition.
|
||||
* HELPERS: typesProvider, classes
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: TypesProvider) {
|
||||
when {
|
||||
|
||||
Vendored
-10
@@ -2,16 +2,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -DEBUG_INFO_SMARTCAST
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: When without bound value, various expressions in the control structure body.
|
||||
* HELPERS: typesProvider, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int) {
|
||||
when {
|
||||
|
||||
Vendored
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Allowed break and continue in the control structure body of when.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String {
|
||||
while (true) {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: When without bound value, various boolean values in the when condition.
|
||||
* HELPERS: typesProvider, enumClasses, sealedClasses, classes
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Boolean, value_2: Long): Int {
|
||||
return when {
|
||||
|
||||
Vendored
-12
@@ -1,17 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 2 -> sentence 2
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: 'When' without bound value and with Nothing in condition (subtype of Boolean).
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-25948
|
||||
* HELPERS: typesProvider
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: TypesProvider) {
|
||||
when {
|
||||
|
||||
Vendored
-9
@@ -2,15 +2,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-218
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 3 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: The else condition must also be in the last when entry of when expression, otherwise it is a compile-time error
|
||||
*/
|
||||
|
||||
// FILE: JavaEnum.java
|
||||
enum JavaEnum {
|
||||
Val_1,
|
||||
|
||||
Vendored
-9
@@ -3,15 +3,6 @@
|
||||
// SKIP_TXT
|
||||
// FULL_JDK
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-313
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 4 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: it is possible to replace the else condition with an always-true condition
|
||||
*/
|
||||
|
||||
// FILE: JavaEnum.java
|
||||
|
||||
enum JavaEnum {
|
||||
|
||||
Vendored
-9
@@ -3,15 +3,6 @@
|
||||
// SKIP_TXT
|
||||
// FULL_JDK
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-313
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 4 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: it is possible to replace the else condition with an always-true condition
|
||||
*/
|
||||
|
||||
// FILE: JavaEnum.java
|
||||
|
||||
enum JavaEnum {
|
||||
|
||||
Vendored
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-313
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and with different variants of expressions in the control structure body.
|
||||
* HELPERS: typesProvider, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int) {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-313
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 5 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and allowed break and continue expression (without labels) in the control structure body.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): Int {
|
||||
while (true) {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and type test condition (without companion object in classes), but without type checking operator.
|
||||
* HELPERS: classes
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and type test condition on the non-type operand of the type checking operator.
|
||||
* HELPERS: classes
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any, value_2: Int): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-9
@@ -2,15 +2,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VALUE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 11
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and non-expressions in 'when condition'.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int, value_2: List<Int>): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 12
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' without bound value and with 'else' branch not in the last position.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String = when {
|
||||
else -> ""
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and 'when condition' with range expression, but without containment checking operator.
|
||||
* HELPERS: typesProvider
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int, value_2: TypesProvider): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-10
@@ -1,16 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 3
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and 'when condition' with contains operator and type without defined contains operator.
|
||||
* HELPERS: classes
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int, value_2: EmptyClass, value_3: Int, value_4: Any): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-9
@@ -1,15 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-313
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 7
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and with else branch not in the last position.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String = when (value_1) {
|
||||
else -> ""
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and type test condition.
|
||||
* HELPERS: classes, objects
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any): String {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with bound value and type test condition (invert type checking operator).
|
||||
* HELPERS: classes, sealedClasses, objects
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass) = when (value_1) {
|
||||
!is SealedChild1 -> {}
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-296
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 1
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: 'When' with bound value and enumaration of type test conditions (with invert type checking operator).
|
||||
* HELPERS: sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: SealedClass): String = when (value_1) {
|
||||
is SealedChild1, !is SealedChild3 -> ""
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 10
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with enumeration of the different variants of expressions in 'when condition'.
|
||||
* HELPERS: typesProvider, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any?) {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 10
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: 'When' with different variants of the arithmetic expressions (additive expression and multiplicative expression) in 'when condition'.
|
||||
* HELPERS: typesProvider, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Any?) {
|
||||
when (value_1) {
|
||||
|
||||
Vendored
-9
@@ -1,14 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* MAIN LINK: expressions, when-expression -> paragraph 6 -> sentence 11
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and not allowed break and continue expression (without labels) in 'when condition'.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(value_1: Int): String {
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user