Add 'mute' concept: move tests with unexpected behaviour to the corresponding folder
This commit is contained in:
+19
@@ -64,3 +64,22 @@ fun case_6(value_1: _SealedClassMixed): String = when (value_1) {
|
||||
fun case_7(value_1: _SealedClassEmpty): String = when (value_1) {
|
||||
else -> ""
|
||||
}
|
||||
|
||||
/*
|
||||
CASE DESCRIPTION: Checking for not exhaustive 'when' on opposite types.
|
||||
UNEXPECTED BEHAVIOUR: must be exhaustive
|
||||
ISSUES: KT-22996
|
||||
*/
|
||||
fun case_8(value: _SealedClass?): String = <!NO_ELSE_IN_WHEN!>when<!> (value) {
|
||||
is _SealedChild1, !is _SealedChild3?, <!USELESS_IS_CHECK!>is _SealedChild3?<!> -> ""
|
||||
}
|
||||
|
||||
/*
|
||||
CASE DESCRIPTION: Checking for not exhaustive 'when' on opposite types.
|
||||
UNEXPECTED BEHAVIOUR: must be exhaustive
|
||||
ISSUES: KT-22996
|
||||
*/
|
||||
fun case_9(value: _SealedClass?): String = <!NO_ELSE_IN_WHEN!>when<!> (value) {
|
||||
is _SealedChild1, !is _SealedChild3 -> ""
|
||||
<!USELESS_IS_CHECK!>is _SealedChild3?<!> -> ""
|
||||
}
|
||||
|
||||
+9
@@ -24,3 +24,12 @@ fun case_2(value_1: _EnumClassSingle?): String = when (value_1) {
|
||||
_EnumClassSingle.EVERYTHING -> ""
|
||||
null -> ""
|
||||
}
|
||||
|
||||
/*
|
||||
CASE DESCRIPTION: Checking for not exhaustive 'when' on the empty nullable enum class.
|
||||
UNEXPECTED BEHAVIOUR
|
||||
ISSUES: KT-26044
|
||||
*/
|
||||
fun case_3(value_1: _EnumClassEmpty?): String = <!NO_ELSE_IN_WHEN!>when<!>(value_1) {
|
||||
null -> ""
|
||||
}
|
||||
|
||||
+9
@@ -64,3 +64,12 @@ fun case_6(value_1: _SealedClassMixed?): String = when (value_1) {
|
||||
is _SealedMixedChildObject3 -> ""
|
||||
null -> ""
|
||||
}
|
||||
|
||||
/*
|
||||
CASE DESCRIPTION: Checking for not exhaustive 'when' on the empty nullable sealed class (without subtypes).
|
||||
UNEXPECTED BEHAVIOUR: must be exhaustive
|
||||
ISSUES: KT-26044
|
||||
*/
|
||||
fun case_7(value: _SealedClassEmpty?): String = <!NO_ELSE_IN_WHEN!>when<!> (value) {
|
||||
null -> ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user