library changes after collections mapping

This commit is contained in:
Svetlana Isakova
2012-09-04 16:52:43 +04:00
parent 7c828b9ff7
commit 8b749084b5
75 changed files with 222 additions and 268 deletions
@@ -3,7 +3,6 @@ package test.collection
import kotlin.test.*
import junit.framework.TestCase
import java.util.List
import java.util.Random
class ImmutableArrayListTest() : TestCase() {
@@ -1,6 +1,5 @@
package test.stdlib.issues
import java.util.List
import kotlin.util.*
import kotlin.test.*
import junit.framework.TestCase
@@ -9,7 +9,6 @@ import java.util.ArrayList
import java.util.TreeMap
import org.w3c.dom.*
import org.w3c.dom.events.*
import java.util.List
/**
* This tool generates JavaScript stubs for classes available in the JDK which are already available in the browser environment
@@ -1,7 +1,6 @@
package org.jetbrains.kotlin.tools
import java.io.*
import java.util.List
private val COMMON_AUTOGENERATED_WARNING: String = """//
// NOTE THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt
@@ -116,27 +115,27 @@ fun main(args: Array<String>) {
// JUtilCollections - methods returning a collection of the same input size (if its a collection)
generateFile(File(outDir, "ArraysFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
it.replaceAll("java.util.Collection<T", "Array<T")
it.replaceAll("Collection<T", "Array<T")
}
generateFile(File(outDir, "ArraysFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
it.replaceAll("java.util.Collection<T", "Array<T")
it.replaceAll("Collection<T", "Array<T")
}
for (arrayName in otherArrayNames) {
generateFile(File(outDir, "${arrayName}ArraysFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
replaceGenerics(arrayName, it.replaceAll("<T> java.util.Collection<T>", "${arrayName}Array").
replaceAll("java.util.Collection<T>", "${arrayName}Array"))
replaceGenerics(arrayName, it.replaceAll("<T> Collection<T>", "${arrayName}Array").
replaceAll("Collection<T>", "${arrayName}Array"))
}
generateFile(File(outDir, "${arrayName}ArraysFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
replaceGenerics(arrayName, it.replaceAll("<T> java.util.Collection<T>", "${arrayName}Array").
replaceAll("java.util.Collection<T>", "${arrayName}Array"))
replaceGenerics(arrayName, it.replaceAll("<T> Collection<T>", "${arrayName}Array").
replaceAll("Collection<T>", "${arrayName}Array"))
}
}
generateFile(File(outDir, "StandardFromJUtilCollections.kt"), "package kotlin", File(srcDir, "JUtilCollections.kt")) {
it.replaceAll("java.util.Collection<T", "Iterable<T").replaceAll("(this.size)", "")
it.replaceAll("Collection<T", "Iterable<T").replaceAll("(this.size)", "")
}
generateFile(File(outDir, "StandardFromJUtilCollectionsJVM.kt"), "package kotlin", File(srcDir, "JUtilCollectionsJVM.kt")) {
it.replaceAll("java.util.Collection<T", "Iterable<T").replaceAll("(this.size)", "")
it.replaceAll("Collection<T", "Iterable<T").replaceAll("(this.size)", "")
}
generateDownTos(File(outDir, "DownTo.kt"), "package kotlin")
@@ -3,7 +3,6 @@ package regressions
// TODO comment out the next line to reproduce KT-1617
//import kotlin.util.map
import java.util.Collection
import java.io.File
import junit.framework.TestCase
@@ -1,7 +1,6 @@
package regressions
import junit.framework.TestCase
import java.util.List
class Kt1619Test: TestCase() {