JS IR: unmute tests
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
var invokeOrder = "";
|
||||
val expectedResult = "0_1_9"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
var invokeOrder = "";
|
||||
val expectedResult = "1_0_1_9"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
var invokeOrder: String = ""
|
||||
|
||||
fun test(x: Double = { invokeOrder += "x"; 1.0 }(), a: String, y: Long = { invokeOrder += "y"; 1 }(), b: String): String {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
var invokeOrder = "";
|
||||
val expectedResult = "1_0_1_L"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
return Z().test()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
inline fun eq(a: Any, b: Any) = a == b
|
||||
inline fun ne(a: Any, b: Any) = a != b
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class Box(val value: String)
|
||||
|
||||
var pr = Box("first")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class Box(val value: String)
|
||||
|
||||
val foo = Box("lol")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val n: Any? = null
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Box<T>(val value: T)
|
||||
|
||||
fun box() : String {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Base<T>(val value: T)
|
||||
class Box(): Base<Long>(-1)
|
||||
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Box<T>(val value: T)
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
public class CalculatorConstants(
|
||||
val id: Long = 0,
|
||||
val detour: Double = 0.0,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
inline fun inlineCall(action: () -> Unit) {
|
||||
action()
|
||||
}
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// LANGUAGE_VERSION: 1.0
|
||||
|
||||
data class Foo(val s: String)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
if (1L != 1.toLong()) return "fail 1"
|
||||
if (0x1L != 0x1.toLong()) return "fail 2"
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo(x: Long, y: Int, z: Double, s: String) {}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Foo {
|
||||
var rnd = 10
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo(x: Any?, y: Any?) = 0L
|
||||
|
||||
inline fun test(value: Any?): Long {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A<T>(val x: T)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A(val a: Long)
|
||||
|
||||
fun box() : String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
data class A<T>(val x: T)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo(a: String = "Companion", b: Int = 1, c: Long = 2): String {
|
||||
return "$a $b $c"
|
||||
}
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: Var.kt
|
||||
package pvar
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
if ((42 ?: 239) != 42) return "Fail Int"
|
||||
if ((42.toLong() ?: 239.toLong()) != 42.toLong()) return "Fail Long"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
42!!
|
||||
42.toLong()!!
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun String.foo() : String {
|
||||
fun Int.bar() : String {
|
||||
fun Long.baz() : String {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Test {
|
||||
var doubleStorage = "fail"
|
||||
var longStorage = "fail"
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
var fooStorage = "Fail"
|
||||
var barStorage = "Fail"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class T4(
|
||||
val c1: Boolean,
|
||||
val c2: Boolean,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box() : String {
|
||||
val fps : Double = 1.toDouble()
|
||||
var mspf : Long
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun eqDI(x: Any?, y: Any?) = x is Double? && y is Int? && x == y
|
||||
fun eqDL(x: Any?, y: Any?) = x is Double? && y is Long? && x == y
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
val minus: Any = -0.0
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class AByte(var value: Byte) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
operator fun Long.get(i: Int) = this
|
||||
operator fun Long.set(i: Int, newValue: Long) {}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class A<T>(var value: T) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
var aByte: Byte? = 0
|
||||
var bByte: Byte = 0
|
||||
|
||||
Vendored
-1
@@ -1,6 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
inline class UInt(val value: Int)
|
||||
inline class ULong(val value: Long)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class A {
|
||||
class B1
|
||||
class B2(val x: Int)
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class A(val s: String) {
|
||||
open inner class B(s: String): A(s)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
//KT-3042 Attempt to split long or double on the stack excepion
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Outer {
|
||||
fun String.id(): String {
|
||||
class Local(unused: Long) {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun f(l : Long) {
|
||||
l.rangeTo(l)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
interface A : Comparable<A>
|
||||
|
||||
class B(val x: Int) : A {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun checkLess(x: Double, y: Long) = when {
|
||||
x >= y -> "Fail $x >= $y"
|
||||
!(x < y) -> "Fail !($x < $y)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun checkLess(x: Int, y: Long) = when {
|
||||
x >= y -> "Fail $x >= $y"
|
||||
!(x < y) -> "Fail !($x < $y)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun checkLess(x: Long, y: Double) = when {
|
||||
x >= y -> "Fail $x >= $y"
|
||||
!(x < y) -> "Fail !($x < $y)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun checkLess(x: Long, y: Int) = when {
|
||||
x >= y -> "Fail $x >= $y"
|
||||
!(x < y) -> "Fail !($x < $y)"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class X(var value: Long)
|
||||
|
||||
operator fun X.inc(): X {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: test.kt
|
||||
import base.*
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
var xi = 0
|
||||
var xin : Int? = 0
|
||||
var xinn : Int? = null
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class C(val x: Int) {
|
||||
override fun equals(rhs: Any?): Boolean {
|
||||
if (rhs is C) {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
val x: Long = 0L
|
||||
|
||||
fun box(): String {
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// Auto-generated by GeneratePrimitiveVsObjectEqualityTestData. Do not edit!
|
||||
|
||||
val nx: Long? = 0L
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// Auto-generated by GeneratePrimitiveVsObjectEqualityTestData. Do not edit!
|
||||
|
||||
val nx: Long? = 0L
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// Auto-generated by GeneratePrimitiveVsObjectEqualityTestData. Do not edit!
|
||||
|
||||
val nx: Any? = 0L
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// Strictly speaking, asymmetric equals violates contract for 'Object#equals'.
|
||||
// However, we don't rely on this contract so far.
|
||||
class FakeInt(val value: Int) {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class CInt(val value: Int)
|
||||
val nCInt3: CInt? = CInt(3)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val i: Int = 10000
|
||||
if (!(i === i)) return "Fail int ==="
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun f(x: Long, zzz: Long = 1): Long
|
||||
{
|
||||
return if (x <= 1) zzz
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
if (3.compareTo(2) != 1) return "Fail #1"
|
||||
if (5.toByte().compareTo(10.toLong()) >= 0) return "Fail #2"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class Book(val name: String) : Comparable<Book> {
|
||||
override fun compareTo(other: Book) = name.compareTo(other.name)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
public abstract class VirtualFile() {
|
||||
public abstract val size : Long
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
package name
|
||||
|
||||
class Test() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class ImpulsMigration
|
||||
{
|
||||
fun migrate(oldVersion: Long)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun foo(): Long {
|
||||
var n = 2L
|
||||
if (n > 0L) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun Int.foo() = 239
|
||||
fun Long.bar() = 239.toLong()
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun f(b : Long.(Long)->Long) = 1L?.b(2L)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
val global = "OK"
|
||||
class A {
|
||||
val prop: String
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
var log = ""
|
||||
|
||||
open class Base(val s: String)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
open class Base(val addr: Long, val name: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
A.Nested().nestedA()
|
||||
A.Nested().Inner().innerA()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: test.kt
|
||||
import b.B
|
||||
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: test.kt
|
||||
import b.B
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val a1: Byte = -1
|
||||
val a2: Short = -1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
fun box(): String {
|
||||
val a1: Byte? = -1
|
||||
val a2: Short? = -1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
class LongR {
|
||||
operator fun contains(l : Long): Boolean = l == 5.toLong()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
Reference in New Issue
Block a user