Migrate boxInline tests to new multi-file framework

This commit is contained in:
Alexander Udalov
2016-02-24 13:29:32 +03:00
committed by Alexander Udalov
parent fa1f7d988e
commit cc84aabdcf
586 changed files with 6946 additions and 5639 deletions
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return ContentTypeByExtension.processRecords { ext -> ext }
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test
object ContentTypeByExtension {
@@ -15,4 +17,12 @@ inline fun A.toLowerCase(): String = (this as B).value
open class A
open class B(val value: String) : A()
open class B(val value: String) : A()
// FILE: 2.kt
import test.*
fun box(): String {
return ContentTypeByExtension.processRecords { ext -> ext }
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return ContentTypeByExtension.processRecords { ext -> ext }
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test
object ContentTypeByExtension {
@@ -15,4 +17,12 @@ inline fun A.toLowerCase(): String = (this as B).value
open class A
open class B(val value: String) : A()
open class B(val value: String) : A()
// FILE: 2.kt
import test.*
fun box(): String {
return ContentTypeByExtension.processRecords { ext -> ext }
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return processRecords { ext -> ext + "K" }
}
@@ -1,5 +0,0 @@
package test
inline fun foo(x: String) = x
inline fun processRecords(block: (String) -> String) = block(foo("O"))
@@ -0,0 +1,15 @@
// FILE: 1.kt
package test
inline fun foo(x: String) = x
inline fun processRecords(block: (String) -> String) = block(foo("O"))
// FILE: 2.kt
import test.*
fun box(): String {
return processRecords { ext -> ext + "K" }
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return processRecords { "O" + it }
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test
inline fun foo(x: String) = x
@@ -9,3 +11,11 @@ class A {
inline fun processRecords(block: (String) -> String): String {
return A().test(block(foo("K")))
}
// FILE: 2.kt
import test.*
fun box(): String {
return processRecords { "O" + it }
}
@@ -1,7 +0,0 @@
import test.*
fun box(): String {
val result = processRecords { "B" + it }
return if (result == "BOK1") "OK" else "fail: $result"
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test
inline fun foo(x: String, y: String) = x + y
@@ -9,3 +11,13 @@ class A {
inline fun processRecords(block: (String) -> String): String {
return A().test(block(foo("O", foo("K", "1"))))
}
// FILE: 2.kt
import test.*
fun box(): String {
val result = processRecords { "B" + it }
return if (result == "BOK1") "OK" else "fail: $result"
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String {
return processRecords { a, b -> a + b}
}
@@ -1,3 +1,5 @@
// FILE: 1.kt
package test
inline fun foo(x: String) = x
@@ -8,3 +10,11 @@ fun test(a: String, s: String) = s
inline fun processRecords(block: (String, String) -> String): String {
return test("stub", block(foo("O"), foo("K")))
}
// FILE: 2.kt
import test.*
fun box(): String {
return processRecords { a, b -> a + b}
}
@@ -1,5 +0,0 @@
import test.*
fun box(): String? {
return processRecords("O") { this + "K" }
}
@@ -1,5 +1,15 @@
// FILE: 1.kt
package test
inline fun foo(x: String) = x
inline fun processRecords(s: String?, block: String.(String) -> String) = s?.block(foo("O"))
// FILE: 2.kt
import test.*
fun box(): String? {
return processRecords("O") { this + "K" }
}