Fix Kotlin debug tests by reverting formatting
Change-Id: Ia65c68a3e309dedf0a3454454815b13de1399d87
diff --git a/src/test/kotlinR8TestResources/debug/KotlinApp.kt b/src/test/kotlinR8TestResources/debug/KotlinApp.kt
index f347218..094407b 100644
--- a/src/test/kotlinR8TestResources/debug/KotlinApp.kt
+++ b/src/test/kotlinR8TestResources/debug/KotlinApp.kt
@@ -4,27 +4,26 @@
class KotlinApp {
- fun ifElse(cond: Boolean) {
- val a = 10
- if (cond) {
- val b = a * 2
- printInt(b)
- } else {
- val c = a / 2
- print(c)
+ fun ifElse(cond: Boolean) {
+ val a = 10
+ if (cond) {
+ val b = a * 2
+ printInt(b)
+ } else {
+ val c = a / 2
+ print(c)
+ }
}
- }
- fun printInt(i: Int) {
- println(i)
- }
-
- companion object {
- @JvmStatic
- fun main(args: Array<String>) {
- val instance = KotlinApp()
- instance.ifElse(true)
- instance.ifElse(false)
+ fun printInt(i: Int) {
+ println(i)
}
- }
-}
+
+ companion object {
+ @JvmStatic fun main(args: Array<String>) {
+ val instance = KotlinApp()
+ instance.ifElse(true)
+ instance.ifElse(false)
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/kotlinR8TestResources/debug/KotlinInline.kt b/src/test/kotlinR8TestResources/debug/KotlinInline.kt
index 479efe2..4b55c57 100644
--- a/src/test/kotlinR8TestResources/debug/KotlinInline.kt
+++ b/src/test/kotlinR8TestResources/debug/KotlinInline.kt
@@ -4,80 +4,81 @@
class KotlinInline {
- fun processObject(obj: Any, func: (Any) -> Unit) {
- func(obj)
- }
-
- fun printObject(obj: Any) {
- println(obj)
- }
-
- fun invokeInlinedFunctions() {
- inlinedA {
- val inA = 1
- inlinedB {
- val inB = 2
- foo(inA, inB)
- }
+ fun processObject(obj: Any, func: (Any) -> Unit) {
+ func(obj)
}
- }
- inline fun inlinedA(f: () -> Unit) {
- f()
- }
-
- inline fun inlinedB(f: () -> Unit) {
- f()
- }
-
- fun foo(a: Int, b: Int) {
- println("a=$a, b=$b")
- }
-
- fun emptyMethod(unused: Int) {}
-
- fun singleInline() {
- emptyMethod(0)
- inlined()
- emptyMethod(1)
- }
-
- inline fun inlined() {
- emptyMethod(-1)
- }
-
- // Double inlining
- fun testNestedInlining() {
- val l1 = Int.MAX_VALUE
- val l2 = Int.MIN_VALUE
- inlinee1(l1, l2)
- }
-
- inline fun inlinee1(a: Int, b: Int) {
- val c = a - 2
- inlinee2(1) {
- val left = a + b
- val right = a - b
- foo(left, right)
+ fun printObject(obj: Any) {
+ println(obj)
}
- inlinee2(c) { foo(b, a) }
- }
- inline fun inlinee2(p: Int, block: () -> Unit) {
- if (p > 0) {
- block()
+ fun invokeInlinedFunctions() {
+ inlinedA {
+ val inA = 1
+ inlinedB {
+ val inB = 2
+ foo(inA, inB)
+ }
+ }
}
- }
- companion object {
- @JvmStatic
- fun main(args: Array<String>) {
- println("Hello world!")
- val instance = KotlinInline()
- instance.processObject(instance, instance::printObject)
- instance.invokeInlinedFunctions()
- instance.singleInline()
- instance.testNestedInlining()
+ inline fun inlinedA(f: () -> Unit) {
+ f()
}
- }
-}
+
+ inline fun inlinedB(f: () -> Unit) {
+ f()
+ }
+
+ fun foo(a: Int, b: Int) {
+ println("a=$a, b=$b")
+ }
+
+ fun emptyMethod(unused: Int) {
+ }
+
+ fun singleInline() {
+ emptyMethod(0)
+ inlined()
+ emptyMethod(1)
+ }
+
+ inline fun inlined() {
+ emptyMethod(-1)
+ }
+
+ // Double inlining
+ fun testNestedInlining() {
+ val l1 = Int.MAX_VALUE
+ val l2 = Int.MIN_VALUE
+ inlinee1(l1, l2)
+ }
+ inline fun inlinee1(a: Int, b: Int) {
+ val c = a - 2
+ inlinee2(1) {
+ val left = a + b
+ val right = a - b
+ foo(left, right)
+ }
+ inlinee2(c) {
+ foo(b, a)
+ }
+ }
+
+ inline fun inlinee2(p: Int, block: () -> Unit) {
+ if (p > 0) {
+ block()
+ }
+ }
+
+ companion object {
+ @JvmStatic fun main(args: Array<String>) {
+ println("Hello world!")
+ val instance = KotlinInline()
+ instance.processObject(instance, instance::printObject)
+ instance.invokeInlinedFunctions()
+ instance.singleInline()
+ instance.testNestedInlining()
+ }
+ }
+}
\ No newline at end of file