[Wasm] PL tests implementation for Wasm target
Fixed #KT-58088
This commit is contained in:
committed by
Space Team
parent
6b66195afc
commit
7c16528560
@@ -0,0 +1,20 @@
|
||||
import abitestutils.abiTest
|
||||
import abitestutils.TestBuilder
|
||||
|
||||
fun box() = abiTest {
|
||||
val rcifaec = RegularClassInheritedFromAbstractExternalClass()
|
||||
val rcifeiifoec = RegularClassInheritedFromExternalInterfaceInheritedFromOpenExternalClass()
|
||||
|
||||
expectSuccess("RegularClassInheritedFromAbstractExternalClass.abstractFunction") { rcifaec.abstractFunction() }
|
||||
expectSuccess("RegularClassInheritedFromAbstractExternalClass.removedAbstractFunction") { rcifaec.removedAbstractFunction() }
|
||||
expectFailure(nonImplementedCallable("function 'addedAbstractFunction'", "class 'RegularClassInheritedFromAbstractExternalClass'")) { rcifaec.addedAbstractFunction() }
|
||||
expectSuccess("AbstractExternalClass.function") { rcifaec.function() }
|
||||
expectFailure(linkage("Function 'removedFunction' can not be called: No function found for symbol '/RegularClassInheritedFromAbstractExternalClass.removedFunction'")) { rcifaec.callRemovedFunction() }
|
||||
expectSuccess("AbstractExternalClass.addedFunction") { rcifaec.addedFunction() }
|
||||
|
||||
expectSuccess("OpenExternalClass.function") { rcifeiifoec.function() }
|
||||
expectSuccess("RegularClassInheritedFromExternalInterfaceInheritedFromOpenExternalClass.abstractFunction") { rcifeiifoec.abstractFunction() }
|
||||
}
|
||||
|
||||
private fun TestBuilder.expectRuntimeFailure(errorMessage: String, block: () -> Any) =
|
||||
expectFailure(custom { throwable -> throwable !is Exception && throwable.message == errorMessage }) { block() }
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
STEP 1:
|
||||
dependencies: stdlib, lib1, lib2
|
||||
Reference in New Issue
Block a user