Minor: add test for KT-11993 "NoSuchMethodError when testing internal symbols"

This commit is contained in:
Zalim Bashorov
2016-05-04 22:41:07 +03:00
parent 6cafa51b07
commit c11d504a26
6 changed files with 120 additions and 1 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +54,7 @@ import org.jetbrains.org.objectweb.asm.MethodVisitor
import org.jetbrains.org.objectweb.asm.Opcodes
import org.junit.Assert
import java.io.*
import java.net.URLClassLoader
import java.util.*
import java.util.regex.Pattern
import java.util.zip.ZipOutputStream
@@ -532,6 +533,15 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
result.checkErrors()
}
fun testInternalFromSpecialRelatedModule() {
initProject()
makeAll().assertSuccessful()
val classpath = listOf("out/production/module1", "out/test/module2").map { File(workDir, it).toURI().toURL() }.toTypedArray()
val clazz = URLClassLoader(classpath).loadClass("test2.BarKt")
clazz.getMethod("box").invoke(null)
}
fun testCircularDependenciesInternalFromAnotherModule() {
initProject()
val result = makeAll()