[Tests] Migrate backend-independent tests from native to compiler/testData.

^KT-65979
This commit is contained in:
Vladimir Sukharev
2024-02-25 18:25:58 +01:00
committed by Space Team
parent dd9332d9e1
commit febac0dd5f
640 changed files with 68168 additions and 6313 deletions
@@ -1,24 +0,0 @@
/*
* 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")
}
@@ -1,17 +0,0 @@
/*
* 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"
}