Add codegen box test templates for identifiers

This commit is contained in:
victor.petukhov
2018-09-25 13:06:55 +03:00
parent dd91727a78
commit 1bc0c4092c
28 changed files with 800 additions and 0 deletions
@@ -0,0 +1,22 @@
<!DIRECTIVES("HELPERS: REFLECT")!>
package org.jetbrains.<!ELEMENT(1)!>
open class A {
companion object <!ELEMENT(2)!> {
}
}
class B {
companion object <!ELEMENT(3)!>: A() {
}
}
fun box(): String? {
if (!checkCompanionObjectName(A::class, "org.jetbrains.<!ELEMENT_VALIDATION(1)!>.A.<!ELEMENT_VALIDATION(2)!>")) return null
if (!checkCompanionObjectName(B::class, "org.jetbrains.<!ELEMENT_VALIDATION(1)!>.B.<!ELEMENT_VALIDATION(3)!>")) return null
return "OK"
}