KT-47939 basic fun interface constructor reference box test

This commit is contained in:
Dmitry Petrov
2021-11-29 19:31:25 +03:00
committed by TeamCityServer
parent 11daed8b01
commit 58f1504aaf
12 changed files with 168 additions and 22 deletions
@@ -2436,6 +2436,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/callableReference/funInterfaceConstructor")
@TestDataPath("$PROJECT_ROOT")
public class FunInterfaceConstructor {
@Test
public void testAllFilesPresentInFunInterfaceConstructor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/funInterfaceConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("funInterfaceConstructor.kt")
public void testFunInterfaceConstructor() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/funInterfaceConstructor/funInterfaceConstructor.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/callableReference/function")
@TestDataPath("$PROJECT_ROOT")
@@ -2478,6 +2478,22 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/callableReference/funInterfaceConstructor")
@TestDataPath("$PROJECT_ROOT")
public class FunInterfaceConstructor {
@Test
public void testAllFilesPresentInFunInterfaceConstructor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/funInterfaceConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("funInterfaceConstructor.kt")
public void testFunInterfaceConstructor() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/funInterfaceConstructor/funInterfaceConstructor.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/callableReference/function")
@TestDataPath("$PROJECT_ROOT")
@@ -2204,6 +2204,24 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/funInterfaceConstructor")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterfaceConstructor extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInFunInterfaceConstructor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/funInterfaceConstructor"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("funInterfaceConstructor.kt")
public void testFunInterfaceConstructor() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/funInterfaceConstructor/funInterfaceConstructor.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/function")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)