mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
Minor, move obsolete test to oldLanguageVersions
Ignore this directory in JVM IR boxAgainstJava tests (similarly to box tests) so that we can ignore the fact that this test doesn't pass in JVM_IR, since it shouldn't.
This commit is contained in:
31
compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt
vendored
Normal file
31
compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// !LANGUAGE: -ThrowNpeOnExplicitEqualsForBoxedNull
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// ^ ThrowNpeOnExplicitEqualsForBoxedNull is introduced in 1.2.
|
||||
// FILE: JavaClass.java
|
||||
|
||||
public class JavaClass {
|
||||
|
||||
public Double minus0(){
|
||||
return -0.0;
|
||||
}
|
||||
|
||||
public Double plus0(){
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
public Double null0(){
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// FILE: b.kt
|
||||
|
||||
fun box(): String {
|
||||
val jClass = JavaClass()
|
||||
|
||||
if (jClass.null0().equals(jClass.plus0())) return "fail 6"
|
||||
if (jClass.minus0().equals(jClass.null0())) return "fail 7"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user