Intrinsic default objects implementation: tests

This commit is contained in:
Nikolay Krasko
2015-03-03 19:25:47 +03:00
parent 1f79e0905f
commit 30a50746b5
12 changed files with 346 additions and 4 deletions
@@ -0,0 +1,41 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
fun box(): String {
try {
// Objects
val i = Int
val d = Double
val f = Float
val l = Long
val sh = Short
val b = Byte
val st = String
test(Int)
test(Double)
test(Float)
test(Long)
test(Short)
test(Byte)
test(String)
// Common Double
Double.POSITIVE_INFINITY
Double.NEGATIVE_INFINITY
Double.NaN
// Common Float
Float.POSITIVE_INFINITY
Float.NEGATIVE_INFINITY
Float.NaN
}
catch (e: Throwable) {
return "Error: \n" + e
}
return "OK"
}
fun test(a: Any) {}