[Wasm] Add external file checker to K2

#KT-56849
This commit is contained in:
Svyatoslav Kuzmich
2023-11-22 12:52:11 +01:00
committed by Space Team
parent 7687b86654
commit 6b6353f3b9
11 changed files with 120 additions and 0 deletions
@@ -138,6 +138,12 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/module"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsModuleNonExternal.kt")
public void testJsModuleNonExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/jsModuleNonExternal.kt");
}
@Test
@TestMetadata("jsVarProhibited.kt")
public void testJsVarProhibited() throws Exception {
@@ -157,6 +163,22 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier")
@TestDataPath("$PROJECT_ROOT")
public class Qualifier {
@Test
public void testAllFilesPresentInQualifier() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsQualifierNonExternal.kt")
public void testJsQualifierNonExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier/jsQualifierNonExternal.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/rtti")
@TestDataPath("$PROJECT_ROOT")
@@ -138,6 +138,12 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/module"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsModuleNonExternal.kt")
public void testJsModuleNonExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/module/jsModuleNonExternal.kt");
}
@Test
@TestMetadata("jsVarProhibited.kt")
public void testJsVarProhibited() throws Exception {
@@ -157,6 +163,22 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier")
@TestDataPath("$PROJECT_ROOT")
public class Qualifier {
@Test
public void testAllFilesPresentInQualifier() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("jsQualifierNonExternal.kt")
public void testJsQualifierNonExternal() throws Exception {
runTest("compiler/testData/diagnostics/wasmTests/jsInterop/qualifier/jsQualifierNonExternal.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/wasmTests/jsInterop/rtti")
@TestDataPath("$PROJECT_ROOT")