Add boolean literals diagnostic spec tests
This commit is contained in:
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SECTIONS: constant-literals, boolean-literals
|
||||
* PARAGRAPH: 1
|
||||
* SENTENCE: [3] These are strong keywords which cannot be used as identifiers unless [escaped][Escaped identifiers].
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class.
|
||||
* NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
true checkType { <!TYPE_MISMATCH!>_<!><Boolean?>() }
|
||||
false checkType { <!TYPE_MISMATCH!>_<!><Boolean?>() }
|
||||
|
||||
true checkType { <!TYPE_MISMATCH!>_<!><Any?>() }
|
||||
false checkType { <!TYPE_MISMATCH!>_<!><Any>() }
|
||||
|
||||
true checkType { <!TYPE_MISMATCH!>_<!><Nothing?>() }
|
||||
false checkType { <!TYPE_MISMATCH!>_<!><Nothing>() }
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun case_1(): kotlin.Unit
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: constant-literals, boolean-literals
|
||||
* PARAGRAPH: 1
|
||||
* SENTENCE: [3] These are strong keywords which cannot be used as identifiers unless [escaped][Escaped identifiers].
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class.
|
||||
* NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
true checkType { _<Boolean>() }
|
||||
false checkType { _<Boolean>() }
|
||||
|
||||
checkSubtype<Boolean>(true)
|
||||
checkSubtype<Boolean>(false)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun case_1(): kotlin.Unit
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: constant-literals, boolean-literals
|
||||
* PARAGRAPH: 1
|
||||
* SENTENCE: [3] These are strong keywords which cannot be used as identifiers unless [escaped][Escaped identifiers].
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class.
|
||||
* NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
checkSubtype<Boolean?>(true)
|
||||
checkSubtype<Boolean?>(false)
|
||||
|
||||
checkSubtype<Any>(true)
|
||||
checkSubtype<Any>(false)
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun case_1(): kotlin.Unit
|
||||
Reference in New Issue
Block a user