[K/N][tests] Move tests into better places

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-01-04 10:56:00 +01:00
committed by Space Team
parent e68bd1f04f
commit d972fec13c
7 changed files with 7349 additions and 7406 deletions
@@ -0,0 +1,24 @@
/*
* 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.
*/
// WITH_STDLIB
// This test verifies absence of buggy optimzation removed in https://github.com/JetBrains/kotlin/commit/d222e9587
import kotlin.test.*
fun box(): String {
val list = foo()
if (!(list == foo()))
return "FAIL =="
if (list === foo())
return "FAIL ===: two listOf() having same contents are not optimized to be referentially equal in all backends, but are now unexpectedly referentially equal"
if (list.toString() != "[a, b, c]")
return "FAIL toString(): ${list.toString()}"
return "OK"
}
fun foo(): List<String> {
return listOf("a", "b", "c")
}
@@ -0,0 +1,17 @@
/*
* 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.
*/
import kotlin.test.*
fun box(): String {
val str1 = "Hello"
val str2 = "Hello"
if (!(str1 == str2))
return "FAIL =="
if (!(str1 === str2))
return "FAIL ==="
return "OK"
}
@@ -0,0 +1,22 @@
/*
* 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.
*/
// TODO: string deduplication across several components seems to require
// linking them as bitcode modules before translating to machine code.
// IGNORE_BACKEND: JVM, JVM_IR
// DISABLE_NATIVE
// WITH_STDLIB
import kotlin.test.*
fun box(): String {
val str1 = ""
val str2 = "hello".subSequence(2, 2)
if(!(str1 == str2))
return "FAIL =="
if(!(str1 === str2))
return "FAIL ==="
return "OK"
}