[Wasm] Add JsModule checker to K2

#KT-56849
This commit is contained in:
Svyatoslav Kuzmich
2023-11-22 11:33:31 +01:00
committed by Space Team
parent 977d1c0e41
commit 7687b86654
11 changed files with 169 additions and 1 deletions
@@ -129,6 +129,34 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/wrongQualifier.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/module")
@TestDataPath("$PROJECT_ROOT")
public class Module {
@Test
public void testAllFilesPresentInModule() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/module"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsVarProhibited.kt")
public void testJsVarProhibited() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/jsVarProhibited.kt");
}
@Test
@TestMetadata("nestedProhibited.kt")
public void testNestedProhibited() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/nestedProhibited.kt");
}
@Test
@TestMetadata("prohibitedOnNonNative.kt")
public void testProhibitedOnNonNative() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/prohibitedOnNonNative.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/rtti")
@TestDataPath("$PROJECT_ROOT")
@@ -129,6 +129,34 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/wrongQualifier.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/module")
@TestDataPath("$PROJECT_ROOT")
public class Module {
@Test
public void testAllFilesPresentInModule() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/module"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsVarProhibited.kt")
public void testJsVarProhibited() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/jsVarProhibited.kt");
}
@Test
@TestMetadata("nestedProhibited.kt")
public void testNestedProhibited() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/nestedProhibited.kt");
}
@Test
@TestMetadata("prohibitedOnNonNative.kt")
public void testProhibitedOnNonNative() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/prohibitedOnNonNative.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/rtti")
@TestDataPath("$PROJECT_ROOT")