Add regression tests for KT-46890 and other stuff
This commit is contained in:
+46
@@ -20196,6 +20196,52 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class Result {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
-4
@@ -677,10 +677,6 @@ class ExpressionCodegen(
|
|||||||
return when {
|
return when {
|
||||||
// Only care about `Result<T>`; `Result<T>?` is boxed in any case.
|
// Only care about `Result<T>`; `Result<T>?` is boxed in any case.
|
||||||
type.erasedUpperBound.fqNameWhenAvailable != StandardNames.RESULT_FQ_NAME || type.isNullable() -> null
|
type.erasedUpperBound.fqNameWhenAvailable != StandardNames.RESULT_FQ_NAME || type.isNullable() -> null
|
||||||
// In `SuspendLambda.invoke`, we take a boxed result and store it in a field of type `Any?` (or pass it
|
|
||||||
// to `create(Any?)`). Normally, we'd unbox here and the box at the store/call, but the boxing is elided
|
|
||||||
// by the hack in `PromisedValue.materializedAt`, and so we remove the unboxing as well. TODO: unhack this.
|
|
||||||
parentAsClass.origin == JvmLoweredDeclarationOrigin.SUSPEND_LAMBDA && name == OperatorNameConventions.INVOKE -> false
|
|
||||||
// If there's a bridge, it will unbox `Result` along with transforming all other arguments.
|
// If there's a bridge, it will unbox `Result` along with transforming all other arguments.
|
||||||
parentAsClass.declarations.any { function ->
|
parentAsClass.declarations.any { function ->
|
||||||
function is IrSimpleFunction && function != this &&
|
function is IrSimpleFunction && function != this &&
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: JVM, WASM
|
||||||
|
interface I<T> {
|
||||||
|
fun foo(x: T): T
|
||||||
|
}
|
||||||
|
|
||||||
|
class C : I<Result<Any?>> {
|
||||||
|
override fun foo(x: Result<Any?>) = x
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = C().foo(Result.success("OK")).getOrNull()
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: JVM, WASM
|
||||||
|
interface I<T> {
|
||||||
|
fun foo(x: T): Any?
|
||||||
|
}
|
||||||
|
|
||||||
|
class C : I<Result<Any?>> {
|
||||||
|
override fun foo(x: Result<Any?>) = x.getOrNullNoinline()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> Result<T>.getOrNullNoinline() = getOrNull()
|
||||||
|
|
||||||
|
fun box() = C().foo(Result.success("OK"))
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: JVM
|
||||||
|
interface C<T> {
|
||||||
|
abstract fun foo(x: T): String
|
||||||
|
}
|
||||||
|
|
||||||
|
open class D<T> : C<Result<T>> {
|
||||||
|
open override fun foo(x: Result<T>): String = "???"
|
||||||
|
}
|
||||||
|
|
||||||
|
class E : D<String>() {
|
||||||
|
override fun foo(x: Result<String>): String = x.get()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> Result<T>.get(): T = getOrNull()!!
|
||||||
|
|
||||||
|
fun <T> C<Result<T>>.bar(x: T) = foo(Result.success(x))
|
||||||
|
|
||||||
|
fun box() = E().bar("OK")
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
fun <T> Result<T>.get(): T = getOrNull()!!
|
||||||
|
|
||||||
|
interface C<T> {
|
||||||
|
abstract fun Result<T>.foo(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
class D : C<String> {
|
||||||
|
override fun Result<String>.foo() = get()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> C<T>.bar(x: T) = Result.success(x).foo()
|
||||||
|
|
||||||
|
fun box() = D().bar("OK")
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: WASM
|
||||||
|
interface I<T, V> {
|
||||||
|
fun foo(x: T): V
|
||||||
|
}
|
||||||
|
|
||||||
|
class C : I<Result<Any?>, Any?> {
|
||||||
|
override fun foo(x: Result<Any?>) = x.getOrNull()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = (C() as I<Result<Any?>, Any?>).foo(Result.success("OK"))
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
// WITH_RUNTIME
|
||||||
|
// IGNORE_BACKEND: WASM
|
||||||
|
fun <T> Result<T>.getOrNullNoinline() = getOrNull()
|
||||||
|
|
||||||
|
val x = { a: Int, b: Result<String> -> b.getOrNullNoinline() }
|
||||||
|
|
||||||
|
fun box() = x(1, Result.success("OK"))
|
||||||
+46
@@ -20166,6 +20166,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class Result {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
+46
@@ -20196,6 +20196,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class Result {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
+43
@@ -16785,6 +16785,49 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Result extends AbstractLightAnalysisModeTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+43
@@ -14729,6 +14729,49 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Result extends AbstractIrJsCodegenBoxES6Test {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Generated
+43
@@ -14135,6 +14135,49 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Result extends AbstractIrJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Generated
+43
@@ -14200,6 +14200,49 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Result extends AbstractJsCodegenBoxTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+43
@@ -8065,6 +8065,49 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/result")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Result extends AbstractIrCodegenBoxWasmTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInResult() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/result"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall1.kt")
|
||||||
|
public void testDirectCall1() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall1.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("directCall2.kt")
|
||||||
|
public void testDirectCall2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/directCall2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("doubleOverride.kt")
|
||||||
|
public void testDoubleOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/doubleOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOverride.kt")
|
||||||
|
public void testExtensionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/extensionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineMethodOnResult.kt")
|
||||||
|
public void testInlineMethodOnResult() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/inlineMethodOnResult.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaTakesResultThroughBridge.kt")
|
||||||
|
public void testLambdaTakesResultThroughBridge() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/result/lambdaTakesResultThroughBridge.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
@TestMetadata("compiler/testData/codegen/box/inlineClasses/returnResult")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user