[Test] Add CLI tests for platform checkers in MPP
^KT-58881
This commit is contained in:
committed by
Nikolay Lunyak
parent
e8f5e35a86
commit
b71797383f
@@ -0,0 +1,13 @@
|
|||||||
|
$TESTDATA_DIR$/../jvm/firMultiplatformCompilationWithError/common.kt
|
||||||
|
$TESTDATA_DIR$/../jvm/firMultiplatformCompilationWithError/jvm.kt
|
||||||
|
-Xcommon-sources
|
||||||
|
$TESTDATA_DIR$/../jvm/firMultiplatformCompilationWithError/common.kt
|
||||||
|
-language-version
|
||||||
|
2.0
|
||||||
|
-ir-output-dir
|
||||||
|
$TEMP_DIR$
|
||||||
|
-ir-output-name
|
||||||
|
firMultiplatformCompilationWithError
|
||||||
|
-XXLanguage\:+MultiPlatformProjects
|
||||||
|
-libraries
|
||||||
|
libraries/stdlib/build/classes/kotlin/js/main
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
warning: advanced option value is passed in an obsolete form. Please use the '=' character to specify the value: -Xcommon-sources=...
|
||||||
|
warning: ATTENTION!
|
||||||
|
This build uses unsafe internal compiler arguments:
|
||||||
|
|
||||||
|
-XXLanguage:+MultiPlatformProjects
|
||||||
|
|
||||||
|
This mode is not recommended for production use,
|
||||||
|
as no stability/compatibility guarantees are given on
|
||||||
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
|
compiler/testData/cli/jvm/firMultiplatformCompilationWithError/common.kt:7:1: error: class 'CommonClass' is not abstract and does not implement abstract member 'foo'.
|
||||||
|
class CommonClass : B
|
||||||
|
^
|
||||||
|
compiler/testData/cli/jvm/firMultiplatformCompilationWithError/jvm.kt:1:18: error: 'actual interface A : Any' has no corresponding members for expected class members:
|
||||||
|
|
||||||
|
expect fun foo(): Unit
|
||||||
|
|
||||||
|
actual interface A
|
||||||
|
^
|
||||||
|
COMPILATION_ERROR
|
||||||
@@ -8,6 +8,9 @@ This mode is not recommended for production use,
|
|||||||
as no stability/compatibility guarantees are given on
|
as no stability/compatibility guarantees are given on
|
||||||
compiler or generated code. Use it at your own risk!
|
compiler or generated code. Use it at your own risk!
|
||||||
|
|
||||||
|
compiler/testData/cli/jvm/firMultiplatformCompilationWithError/common.kt:7:1: error: class 'CommonClass' is not abstract and does not implement abstract member 'foo'.
|
||||||
|
class CommonClass : B
|
||||||
|
^
|
||||||
compiler/testData/cli/jvm/firMultiplatformCompilationWithError/jvm.kt:1:18: error: 'actual interface A : Any' has no corresponding members for expected class members:
|
compiler/testData/cli/jvm/firMultiplatformCompilationWithError/jvm.kt:1:18: error: 'actual interface A : Any' has no corresponding members for expected class members:
|
||||||
|
|
||||||
expect fun foo(): Unit
|
expect fun foo(): Unit
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
expect interface A {
|
expect interface A {
|
||||||
fun foo()
|
fun foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expect interface B
|
||||||
|
|
||||||
|
class CommonClass : B
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
actual interface A
|
actual interface A
|
||||||
|
|
||||||
|
actual interface B {
|
||||||
|
fun foo()
|
||||||
|
}
|
||||||
|
|||||||
@@ -1328,6 +1328,11 @@ public class CliTestGenerated extends AbstractCliTest {
|
|||||||
runTest("compiler/testData/cli/js/firMppWithKlib.args");
|
runTest("compiler/testData/cli/js/firMppWithKlib.args");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("firMultiplatformCompilationWithError.args")
|
||||||
|
public void testFirMultiplatformCompilationWithError() throws Exception {
|
||||||
|
runTest("compiler/testData/cli/js/firMultiplatformCompilationWithError.args");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("jsExtraHelp.args")
|
@TestMetadata("jsExtraHelp.args")
|
||||||
public void testJsExtraHelp() throws Exception {
|
public void testJsExtraHelp() throws Exception {
|
||||||
runTest("compiler/testData/cli/js/jsExtraHelp.args");
|
runTest("compiler/testData/cli/js/jsExtraHelp.args");
|
||||||
|
|||||||
Reference in New Issue
Block a user