Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.

IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
This commit is contained in:
Ilya Gorbunov
2015-12-24 06:17:03 +03:00
parent fc4250b02b
commit de11ed4fc6
14 changed files with 355 additions and 228 deletions
@@ -0,0 +1,26 @@
package test.js
import org.junit.Test as test
import kotlin.test.*
class NumbersJsTest {
@test fun longMinMaxValues() {
assertEquals(js("Kotlin.Long.MIN_VALUE"), Long.MIN_VALUE)
assertEquals(js("Kotlin.Long.MAX_VALUE"), Long.MAX_VALUE)
}
@test fun doubleMinMaxValues() {
assertEquals(js("Number.MIN_VALUE"), Double.MIN_VALUE)
assertEquals(js("Number.MAX_VALUE"), Double.MAX_VALUE)
assertEquals(js("Number.POSITIVE_INFINITY"), Double.POSITIVE_INFINITY)
assertEquals(js("Number.NEGATIVE_INFINITY"), Double.NEGATIVE_INFINITY)
}
@test fun floatMinMaxValues() {
assertEquals(js("Number.MIN_VALUE"), Float.MIN_VALUE)
assertEquals(js("Number.MAX_VALUE"), Float.MAX_VALUE)
assertEquals(js("Number.POSITIVE_INFINITY"), Float.POSITIVE_INFINITY)
assertEquals(js("Number.NEGATIVE_INFINITY"), Float.NEGATIVE_INFINITY)
}
}