[JS IR BE] Implement Long.rangeTo and unmute tests

This commit is contained in:
Zalim Bashorov
2018-07-23 02:38:49 +03:00
parent adcabd2a5a
commit a6cd552a71
20 changed files with 4 additions and 25 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val r = 1.toLong()..2
var s = ""
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val l: Long = 1
val l2: Long = 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun f(l : Long) {
l.rangeTo(l)
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val shouldBeTrue = 555555555555555555L in 123456789123456789L..987654321987654321L
if (!shouldBeTrue) return "Fail 1"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun abs(x: Int) = if (x < 0) -x else x
fun abs(x: Long) = if (x < 0) -x else x
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun test1(): Long {
var s = 0L
for (i in 1L..4) {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
const val M = Long.MAX_VALUE
fun box(): String {