[tests][FIR][checkers][Wasm] Add test data for KT-66475
This commit is contained in:
committed by
Space Team
parent
bf77cc3d0c
commit
4d17a908e2
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// MODULE: commonwasm
|
||||
// TARGET_PLATFORM: Wasm
|
||||
// FILE: commonwasm.kt
|
||||
|
||||
expect interface ExternalInterface
|
||||
|
||||
external fun externalFunction(arg: <!WRONG_JS_INTEROP_TYPE!>ExternalInterface<!>)
|
||||
|
||||
// MODULE: wasm()()(commonwasm)
|
||||
// TARGET_PLATFORM: Wasm
|
||||
// FILE: wasm.kt
|
||||
|
||||
actual external interface ExternalInterface
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// MODULE: commonwasm
|
||||
// TARGET_PLATFORM: Wasm
|
||||
// FILE: commonwasm.kt
|
||||
|
||||
expect interface <!NO_ACTUAL_FOR_EXPECT!>ExternalInterface<!>
|
||||
|
||||
external fun externalFunction(<!WRONG_JS_INTEROP_TYPE!>arg: ExternalInterface<!>)
|
||||
|
||||
// MODULE: wasm()()(commonwasm)
|
||||
// TARGET_PLATFORM: Wasm
|
||||
// FILE: wasm.kt
|
||||
|
||||
actual external interface ExternalInterface
|
||||
+16
@@ -238,6 +238,22 @@ public class DiagnosticsFirWasmTestGenerated extends AbstractDiagnosticsFirWasmT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/wasmTests/multiplatform")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Multiplatform {
|
||||
@Test
|
||||
@TestMetadata("ActualExternalTypeAsJsInteropType.kt")
|
||||
public void testActualExternalTypeAsJsInteropType() {
|
||||
runTest("compiler/testData/diagnostics/wasmTests/multiplatform/ActualExternalTypeAsJsInteropType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInMultiplatform() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/wasmTests/wasmInterop")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -238,6 +238,22 @@ public class DiagnosticsWasmTestGenerated extends AbstractDiagnosticsWasmTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/wasmTests/multiplatform")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Multiplatform {
|
||||
@Test
|
||||
@TestMetadata("ActualExternalTypeAsJsInteropType.kt")
|
||||
public void testActualExternalTypeAsJsInteropType() {
|
||||
runTest("compiler/testData/diagnostics/wasmTests/multiplatform/ActualExternalTypeAsJsInteropType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInMultiplatform() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/wasmTests/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/wasmTests/wasmInterop")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user