[JS IR BE] Update test data

This commit is contained in:
Roman Artemev
2018-06-13 17:00:56 +03:00
committed by Roman Artemev
parent 02628e8de3
commit f69bd54d6c
174 changed files with 83 additions and 197 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
OUTER@while (true) {
var x = ""
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var x = "OK"
while (true) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
while (true) {
try {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
var result = "Fail"
fun foo() {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
try {
} catch (e: Exception) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun nyCompiler() {
try {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
var s = ""
try {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun foo(args: Array<String>) {
try {
} finally {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun foo(): Int {
try {
} finally {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun testIf() {
val condition = true
val result = if (condition) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun check1() {
val result = if (true) {
if (true) 1 else 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun foo() {
var x = 0
do {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class A() {
fun action() = "OK"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun exit(): Nothing = null!!
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun exit(): Nothing = null!!
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box() : String {
try {
} finally {
@@ -1,3 +1,2 @@
// IGNORE_BACKEND: JS_IR
fun box(): String =
"O" + try { throw Exception("oops!") } catch (e: Exception) { "K" }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun cleanup() {}
inline fun concat(x: String, y: String): String = x + y
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun catchAll(x: String, block: () -> Unit): String {
try {
block()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
public inline fun fails(block: () -> Unit): Throwable? {
var thrown: Throwable? = null
try {
@@ -1,3 +1,2 @@
// IGNORE_BACKEND: JS_IR
fun box(): String =
"O" + try { "K" } finally { "hmmm" }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun <T> tryOrElse(f1: () -> T, f2: () -> T): T {
try {
return f1()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun <T> tryOrElse(f1: () -> T, f2: () -> T): T =
try { f1() } catch (e: Exception) { f2() }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun <T> tryAndThen(f1: () -> Unit, f2: () -> Unit, f3: () -> T): T {
try {
f1()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(string: String, fn: (String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(s1: String, s2: String, fn: (String, String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(s1: String, s2: String, fn: String.(String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(string: String, fn: String.() -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(string: String, fn: (String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap(string: String, fn: (String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun zap(s: String) = s
inline fun tryZap1(string: String, fn: (String) -> String) =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
interface Callable {
fun call(b: Boolean)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun doCall(f: () -> Any) = f()
fun test1() {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class Exception1(msg: String): Exception(msg)
class Exception2(msg: String): Exception(msg)
class Exception3(msg: String): Exception(msg)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun test(s: () -> Int): Int =
try {
val i = s()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun shouldReturnFalse() : Boolean {
try {
return true
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun shouldReturn11() : Int {
var x = 0
while (true) {
@@ -1,3 +1,2 @@
// IGNORE_BACKEND: JS_IR
fun box(): String =
"O" + try { "K" } catch (e: Exception) { "oops!" }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String =
"" +
try { "O" } catch (e: Exception) { "1" } +
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun idiv(a: Int, b: Int): Int =
if (b == 0) throw Exception("Division by zero") else a / b
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String =
"O" +
try {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
class MyException(message: String): Exception(message)
fun box(): String =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
inline fun catchAll(x: String, block: () -> Unit): String {
try {
block()