KT-2752: add test to prove that KT-13024 is no longer reproducible with new implementation of name mangling

This commit is contained in:
Alexey Andreev
2016-07-12 15:46:56 +03:00
parent 4e2b1d68cf
commit 7956b038fd
2 changed files with 33 additions and 0 deletions
@@ -4933,6 +4933,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName);
}
@TestMetadata("importedDeclarationMangling.kt")
public void testImportedDeclarationMangling() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/importedDeclarationMangling.kt");
doTest(fileName);
}
@TestMetadata("packageAndMangledMethodDoNotClash.kt")
public void testPackageAndMangledMethodDoNotClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/packageAndMangledMethodDoNotClash.kt");
@@ -0,0 +1,27 @@
// FILE: a.kt
package foo
import bar.*
import bar.Some.importedFunc
fun box(): String {
Some.justFunc()
importedFunc()
assertEquals("justFunc();importedFunc();", log)
return "OK"
}
// FILE: b.kt
package bar
var log = ""
object Some {
fun justFunc() {
log += "justFunc();"
}
fun importedFunc() {
log += "importedFunc();"
}
}