Implement tests map generator and refactor folder structure to spec tests linking

This commit is contained in:
victor.petukhov
2019-08-19 11:26:12 +03:00
parent 28da325a11
commit cf692fb257
217 changed files with 2827 additions and 1787 deletions
@@ -0,0 +1,32 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-draft
* PLACE: type-system, introduction -> paragraph 5 -> sentence 2
* 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
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-26947
*/
val map = mapOf("x" to null)
fun box(): String {
try {
val x: Int by mapOf("x" to null)
} catch (e: KotlinNullPointerException) {
return "OK"
} catch (e: NullPointerException) {
return "OK"
}
try {
val x: Any by map
} catch (e: KotlinNullPointerException) {
return "OK"
} catch (e: NullPointerException) {
return "OK"
}
return "Error"
}