[Tests] Removed moved tests from old testing

^KT-64256 Fixed
This commit is contained in:
Vladimir Sukharev
2023-12-13 02:25:11 +01:00
committed by Space Team
parent e15068c62f
commit df2dcccbf7
12 changed files with 55 additions and 777 deletions
@@ -1,6 +1,5 @@
import kotlin.test.*
@kotlin.ExperimentalUnsignedTypes
fun box(): String {
assertEquals(UInt.MAX_VALUE, UInt.MIN_VALUE - 1u)
@@ -11,16 +11,6 @@ import kotlin.reflect.*
@Retention(AnnotationRetention.BINARY)
annotation class Associated1(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
@AssociatedObjectKey
@Retention(AnnotationRetention.BINARY)
annotation class Associated2(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
@AssociatedObjectKey
@Retention(AnnotationRetention.BINARY)
annotation class Associated3(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
fun box(): String {
val i1 = I1ImplHolder::class.findAssociatedObject<Associated1>()!! as I1
@@ -11,16 +11,6 @@ import kotlin.reflect.*
@Retention(AnnotationRetention.BINARY)
annotation class Associated1(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
@AssociatedObjectKey
@Retention(AnnotationRetention.BINARY)
annotation class Associated2(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
@AssociatedObjectKey
@Retention(AnnotationRetention.BINARY)
annotation class Associated3(val kClass: KClass<*>)
@OptIn(ExperimentalAssociatedObjects::class)
fun box(): String {
val i2 = I2ImplHolder()::class.findAssociatedObject<Associated1>()!! as I2
@@ -2,7 +2,6 @@
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
// OUTPUT_DATA_FILE: concatenation.out
import kotlin.test.*
@@ -26,26 +26,4 @@ fun box(): String {
}
}
return "OK"
}
class Foo(size: Int) {
val array = IntArray(size)
}
class Bar {
val smallFoo = Foo(1)
val largeFoo = Foo(10)
val smallArray = smallFoo.array
val largeArray = largeFoo.array
}
@Test fun differentArrays() {
val bar = Bar()
assertFailsWith<IndexOutOfBoundsException> {
for (index in 0 until bar.largeArray.size) {
bar.smallArray[index] = 6
}
}
}
@@ -0,0 +1,43 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
import kotlin.test.*
fun box(): String {
val array = CharArray(10) { '0' }
val array1 = CharArray(3) { '0' }
var j = 8
assertFailsWith<IndexOutOfBoundsException> {
for (i in 0 until array.size step 2) {
array[j] = '6'
j++
}
}
assertFailsWith<IndexOutOfBoundsException> {
for (i in 0 until array.size step 2) {
array[i + 3] = '6'
}
}
assertFailsWith<IndexOutOfBoundsException> {
for (i in 0 until array.size step 2) {
array1[i] = '6'
}
}
assertFailsWith<IndexOutOfBoundsException> {
for (i in 0 until (array.size/0.5).toInt() step 2) {
array[i] = '6'
}
}
assertFailsWith<IndexOutOfBoundsException> {
for (i in -array.size until array.size step 2) {
array[i] = '6'
}
}
return "OK"
}
@@ -1,14 +1,4 @@
import kotlin.test.*
import kotlin.contracts.*
open class S
class P(val str: String = "P") : S()
@OptIn(kotlin.contracts.ExperimentalContracts::class)
fun check(actual: Boolean) {
contract { returns() implies actual }
assertTrue(actual)
}
fun box(): String {
assertEquals("STR", nullableString("str"))
@@ -1,14 +1,4 @@
import kotlin.test.*
import kotlin.contracts.*
open class S
class P(val str: String = "P") : S()
@OptIn(kotlin.contracts.ExperimentalContracts::class)
fun check(actual: Boolean) {
contract { returns() implies actual }
assertTrue(actual)
}
fun box(): String {
val i: Int? = 1234
@@ -1,14 +1,4 @@
import kotlin.test.*
import kotlin.contracts.*
open class S
class P(val str: String = "P") : S()
@OptIn(kotlin.contracts.ExperimentalContracts::class)
fun check(actual: Boolean) {
contract { returns() implies actual }
assertTrue(actual)
}
fun box(): String {
val x: Int