mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
Move codegen tests on old language versions under oldLanguageVersions/
This directory is skipped in JVM IR test generator, so they won't show up as failed anymore. Note that only failing tests are moved to oldLanguageVersions/. Tests which already pass are still being run. It may be useful not to break them in case we _do_ need to support some pre-1.3 language feature switches in JVM IR.
This commit is contained in:
15
compiler/testData/codegen/box/oldLanguageVersions/dataClassEqualsHashCodeToString.kt
vendored
Normal file
15
compiler/testData/codegen/box/oldLanguageVersions/dataClassEqualsHashCodeToString.kt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: -DataClassInheritance
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
data class Foo(val s: String)
|
||||
|
||||
fun box(): String {
|
||||
val f1 = Foo("OK")
|
||||
val f2 = Foo("OK")
|
||||
if (f1 != f2) return "Fail equals"
|
||||
if (f1.hashCode() != f2.hashCode()) return "Fail hashCode"
|
||||
if (f1.toString() != f2.toString() || f1.toString() != "Foo(s=OK)") return "Fail toString: $f1 $f2"
|
||||
|
||||
return f1.s
|
||||
}
|
||||
Reference in New Issue
Block a user