even more exact test for KT-2509
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
fun box() : String {
|
fun main(args: Array<String>) {
|
||||||
A()
|
A()
|
||||||
return "OK"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class A: B() {
|
class A: B() {
|
||||||
|
|||||||
@@ -220,9 +220,15 @@ public abstract class CodegenTestCase extends UsefulTestCase {
|
|||||||
else {
|
else {
|
||||||
String fqName = NamespaceCodegen.getJVMClassNameForKotlinNs(JetPsiUtil.getFQName(myFiles.getPsiFiles().get(0))).getFqName().getFqName();
|
String fqName = NamespaceCodegen.getJVMClassNameForKotlinNs(JetPsiUtil.getFQName(myFiles.getPsiFiles().get(0))).getFqName().getFqName();
|
||||||
Class<?> namespaceClass = loader.loadClass(fqName);
|
Class<?> namespaceClass = loader.loadClass(fqName);
|
||||||
Method method = namespaceClass.getMethod("box");
|
try {
|
||||||
r = (String) method.invoke(null);
|
Method method = namespaceClass.getMethod("box");
|
||||||
assertEquals("OK", r);
|
r = (String) method.invoke(null);
|
||||||
|
assertEquals("OK", r);
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodException e) {
|
||||||
|
Method method = namespaceClass.getMethod("main",String[].class);
|
||||||
|
method.invoke(null,new Object[]{new String[0]});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Error e) {
|
} catch (Error e) {
|
||||||
System.out.println(generateToText());
|
System.out.println(generateToText());
|
||||||
|
|||||||
Reference in New Issue
Block a user