Add FULL_JDK to tests in codegen/boxWithStdlib/fullJdk/
Drop the old scheme which relied on the directory name
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
fun box(): String =
|
||||
listOf("a").map { "OK" }.get(0)
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.nio.CharBuffer
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import sun.nio.cs.ext.Big5
|
||||
import sun.net.spi.nameservice.dns.DNSNameService
|
||||
import javax.crypto.Cipher
|
||||
@@ -11,4 +13,4 @@ fun box(): String {
|
||||
val f : SunJCE? = null // sunjce_provider.jar
|
||||
val j : ByteBuffered? = null // rt.jar
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
@file:JvmName("XYZ")
|
||||
import java.lang.reflect.Modifier
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java.lang.Runtime
|
||||
// FULL_JDK
|
||||
|
||||
fun box() : String {
|
||||
val processors = Runtime.getRuntime()!!.availableProcessors()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.LinkedList
|
||||
|
||||
fun ok1(): Boolean {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.net.*
|
||||
|
||||
fun String.decodeURI(encoding : String) : String? =
|
||||
@@ -10,4 +12,4 @@ fun String.decodeURI(encoding : String) : String? =
|
||||
|
||||
fun box() : String {
|
||||
return if("hhh".decodeURI("") == null) "OK" else "fail"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
|
||||
public class A {
|
||||
@@ -19,10 +21,10 @@ public class A {
|
||||
return if (cond.isEmpty()) "OK" else cond.joinToString()
|
||||
}
|
||||
|
||||
return "EXCEPTION WAS NOT CATCHED"
|
||||
return "EXCEPTION WAS NOT CAUGHT"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return A().test()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
// FULL_JDK
|
||||
|
||||
import kotlin.jvm.*
|
||||
package foo
|
||||
|
||||
object ObjWithNative {
|
||||
external fun foo(x: Int = 1): Double
|
||||
@@ -37,4 +37,4 @@ fun box(): String {
|
||||
if (e.message != "foo.DefaultKt.topLevel(I)D") return "Fail 3: " + e.message
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
class C {
|
||||
companion object {
|
||||
val defaultGetter: Int = 1
|
||||
@@ -46,4 +48,4 @@ fun box(): String {
|
||||
?: check({C().defaultSetter = 1}, "C.setDefaultSetter(I)V")
|
||||
|
||||
?: "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import kotlin.jvm.*
|
||||
// FULL_JDK
|
||||
|
||||
class C {
|
||||
companion object {
|
||||
@@ -20,4 +20,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package foo
|
||||
|
||||
import kotlin.jvm.*
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
catch (e: java.lang.UnsatisfiedLinkError) {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
// FULL_JDK
|
||||
|
||||
import kotlin.jvm.*
|
||||
package foo
|
||||
|
||||
class WithNative {
|
||||
companion object {
|
||||
@@ -30,4 +30,4 @@ fun box(): String {
|
||||
if (e.message != "foo.ObjWithNative.bar(JLjava/lang/String;)D") return "Fail 2: " + e.message
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
// FULL_JDK
|
||||
|
||||
import kotlin.jvm.*
|
||||
package foo
|
||||
|
||||
external fun bar(l: Long, s: String): Double
|
||||
|
||||
@@ -16,4 +16,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package collections
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package testeval
|
||||
|
||||
import java.util.*
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package pack
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import org.w3c.dom.Element
|
||||
import org.xml.sax.InputSource
|
||||
import javax.xml.parsers.DocumentBuilderFactory
|
||||
@@ -14,4 +16,4 @@ fun box() : String {
|
||||
val doc = builder.parse(source)!!;
|
||||
val myElement = MyElement(doc.getDocumentElement()!!)
|
||||
return myElement.getTagName()!!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import kotlin.*
|
||||
// FULL_JDK
|
||||
|
||||
fun box() : String {
|
||||
val vector = java.util.Vector<Int>()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package mask
|
||||
|
||||
import java.io.*
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package mask
|
||||
|
||||
import java.io.*
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
package mask
|
||||
|
||||
import java.io.*
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
import java.lang.reflect.ParameterizedType
|
||||
import java.lang.reflect.Type
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun testProperLineNumber(): String {
|
||||
var exceptionCount = 0;
|
||||
try {
|
||||
@@ -9,7 +11,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = (e as java.lang.Throwable).getStackTrace()!!.get(1)
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("chainCalls.kt:6" != actual) {
|
||||
if ("chainCalls.kt:8" != actual) {
|
||||
return "fail 1: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -23,7 +25,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("chainCalls.kt:21" != actual) {
|
||||
if ("chainCalls.kt:23" != actual) {
|
||||
return "fail 2: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -36,7 +38,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("chainCalls.kt:34" != actual) {
|
||||
if ("chainCalls.kt:36" != actual) {
|
||||
return "fail 3: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -48,7 +50,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("chainCalls.kt:46" != actual) {
|
||||
if ("chainCalls.kt:48" != actual) {
|
||||
return "fail 4: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -79,4 +81,4 @@ fun String.fail(): String {
|
||||
|
||||
fun call(): String {
|
||||
return "xxx"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun testProperLineNumber(): String {
|
||||
var exceptionCount = 0;
|
||||
try {
|
||||
@@ -7,7 +9,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = (e as java.lang.Throwable).getStackTrace()!!.get(1)
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("infixCalls.kt:4" != actual) {
|
||||
if ("infixCalls.kt:6" != actual) {
|
||||
return "fail 1: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -20,7 +22,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("infixCalls.kt:17" != actual) {
|
||||
if ("infixCalls.kt:19" != actual) {
|
||||
return "fail 1: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -32,7 +34,7 @@ fun testProperLineNumber(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("infixCalls.kt:30" != actual) {
|
||||
if ("infixCalls.kt:32" != actual) {
|
||||
return "fail 1: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -59,4 +61,4 @@ infix fun String.fail(p: String): String {
|
||||
|
||||
fun call(): String {
|
||||
return "xxx"
|
||||
}
|
||||
}
|
||||
|
||||
+9
-7
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun testProperLineNumberAfterInline(): String {
|
||||
var exceptionCount = 0;
|
||||
try {
|
||||
@@ -7,7 +9,7 @@ fun testProperLineNumberAfterInline(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = (e as java.lang.Throwable).getStackTrace()!!.get(1)
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:4" != actual) {
|
||||
if ("simpleCallWithParams.kt:6" != actual) {
|
||||
return "fail 1: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -20,7 +22,7 @@ fun testProperLineNumberAfterInline(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:17" != actual) {
|
||||
if ("simpleCallWithParams.kt:19" != actual) {
|
||||
return "fail 2: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -38,7 +40,7 @@ fun testProperLineForOtherParameters(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:35" != actual) {
|
||||
if ("simpleCallWithParams.kt:37" != actual) {
|
||||
return "fail 3: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -52,7 +54,7 @@ fun testProperLineForOtherParameters(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:49" != actual) {
|
||||
if ("simpleCallWithParams.kt:51" != actual) {
|
||||
return "fail 4: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -64,7 +66,7 @@ fun testProperLineForOtherParameters(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:62" != actual) {
|
||||
if ("simpleCallWithParams.kt:64" != actual) {
|
||||
return "fail 5: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -76,7 +78,7 @@ fun testProperLineForOtherParameters(): String {
|
||||
catch(e: AssertionError) {
|
||||
val entry = e.stackTrace!![1]
|
||||
val actual = "${entry.getFileName()}:${entry.getLineNumber()}"
|
||||
if ("simpleCallWithParams.kt:74" != actual) {
|
||||
if ("simpleCallWithParams.kt:76" != actual) {
|
||||
return "fail 6: ${actual}"
|
||||
}
|
||||
exceptionCount++
|
||||
@@ -103,4 +105,4 @@ inline fun test(): String {
|
||||
|
||||
fun fail(): String {
|
||||
throw AssertionError("fail")
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun box(): String {
|
||||
var obj0 = "0" as java.lang.Object
|
||||
var obj1 = "1" as java.lang.Object
|
||||
@@ -19,4 +21,4 @@ fun assertThatThreadDoesNotOwnMonitor(obj: java.lang.Object) {
|
||||
catch (e: IllegalMonitorStateException) {
|
||||
// OK
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun box(): String {
|
||||
val obj = "" as java.lang.Object
|
||||
|
||||
@@ -24,4 +26,4 @@ fun assertThatThreadDoesNotOwnMonitor(obj: java.lang.Object) {
|
||||
catch (e: IllegalMonitorStateException) {
|
||||
// OK
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.Executors
|
||||
@@ -174,5 +176,3 @@ fun box(): String {
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.concurrent.*
|
||||
import java.util.concurrent.atomic.*
|
||||
|
||||
@@ -30,4 +32,4 @@ fun box() : String {
|
||||
}
|
||||
cdl.await()
|
||||
return if(mtref.get() == 100) "OK" else mtref.get().toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
fun box(): String {
|
||||
val obj = "" as java.lang.Object
|
||||
try {
|
||||
@@ -13,4 +15,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user