[Tests] Migrate backend-independent tests from native to compiler/testData.
^KT-65979
This commit is contained in:
committed by
Space Team
parent
dd9332d9e1
commit
febac0dd5f
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user