[Wasm] Port external declaration checker to K2 (KT-56849)

Share common code with FirJsExternalChecker using
FirWebCommonExternalChecker
This commit is contained in:
Svyatoslav Kuzmich
2023-10-26 11:46:22 +02:00
committed by Space Team
parent 83aa014d81
commit 62ebb9932f
35 changed files with 948 additions and 547 deletions
@@ -33,12 +33,36 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("anonymousInitializer.kt")
public void testAnonymousInitializer() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/anonymousInitializer.kt");
}
@Test
@TestMetadata("body.kt")
public void testBody() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/body.kt");
}
@Test
@TestMetadata("definedExternally.kt")
public void testDefinedExternally() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/definedExternally.kt");
}
@Test
@TestMetadata("delegatedConstructorCall.kt")
public void testDelegatedConstructorCall() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/delegatedConstructorCall.kt");
}
@Test
@TestMetadata("delegation.kt")
public void testDelegation() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/delegation.kt");
}
@Test
@TestMetadata("dynamicUnsupported.kt")
public void testDynamicUnsupported() throws Exception {
@@ -51,6 +75,12 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/external.kt");
}
@Test
@TestMetadata("externalInterfaceNested.kt")
public void testExternalInterfaceNested() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/externalInterfaceNested.kt");
}
@Test
@TestMetadata("inheritance.kt")
public void testInheritance() throws Exception {
@@ -75,6 +105,18 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/jsFun.kt");
}
@Test
@TestMetadata("nestedExternal.kt")
public void testNestedExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/nestedExternal.kt");
}
@Test
@TestMetadata("nonAbstractMembersOfInterface.kt")
public void testNonAbstractMembersOfInterface() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/nonAbstractMembersOfInterface.kt");
}
@Test
@TestMetadata("types.kt")
public void testTypes() throws Exception {
@@ -33,12 +33,36 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("anonymousInitializer.kt")
public void testAnonymousInitializer() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/anonymousInitializer.kt");
}
@Test
@TestMetadata("body.kt")
public void testBody() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/body.kt");
}
@Test
@TestMetadata("definedExternally.kt")
public void testDefinedExternally() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/definedExternally.kt");
}
@Test
@TestMetadata("delegatedConstructorCall.kt")
public void testDelegatedConstructorCall() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/delegatedConstructorCall.kt");
}
@Test
@TestMetadata("delegation.kt")
public void testDelegation() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/delegation.kt");
}
@Test
@TestMetadata("dynamicUnsupported.kt")
public void testDynamicUnsupported() throws Exception {
@@ -51,6 +75,12 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/external.kt");
}
@Test
@TestMetadata("externalInterfaceNested.kt")
public void testExternalInterfaceNested() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/externalInterfaceNested.kt");
}
@Test
@TestMetadata("inheritance.kt")
public void testInheritance() throws Exception {
@@ -75,6 +105,18 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/jsFun.kt");
}
@Test
@TestMetadata("nestedExternal.kt")
public void testNestedExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/nestedExternal.kt");
}
@Test
@TestMetadata("nonAbstractMembersOfInterface.kt")
public void testNonAbstractMembersOfInterface() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/nonAbstractMembersOfInterface.kt");
}
@Test
@TestMetadata("types.kt")
public void testTypes() throws Exception {