[PL][tests] Keep PL test data under "testData/klib/" dir
This commit is contained in:
committed by
Space Team
parent
9e3afe7a1f
commit
5c3e63e19a
+30
@@ -0,0 +1,30 @@
|
||||
import abitestutils.abiTest
|
||||
|
||||
fun box() = abiTest {
|
||||
class SI1_C : SI1
|
||||
class SC1_C : SC1()
|
||||
class E1_C : E1()
|
||||
class E2_C : E2()
|
||||
|
||||
expectSuccess("A") { computeSI1(SI1.A()) }
|
||||
expectFailure(noWhenBranch()) { computeSI1(SI1_C()) }
|
||||
expectSuccess("B") { computeSI1(SI1.B()) }
|
||||
|
||||
expectSuccess("A") { computeSC1(SC1.A()) }
|
||||
expectFailure(noWhenBranch()) { computeSC1(SC1_C()) }
|
||||
expectSuccess("B") { computeSC1(SC1.B()) }
|
||||
|
||||
expectFailure(linkage("Can not get instance of singleton 'E1.A': No enum entry found for symbol '/E1.A'")) { computeE1(E1.A) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'E1.A': No enum entry found for symbol '/E1.A'")) { computeE1(E1_C()) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'E1.A': No enum entry found for symbol '/E1.A'")) { computeE1(E1.B) }
|
||||
|
||||
expectFailure(linkage("Can not get instance of singleton 'E2.A': No enum entry found for symbol '/E2.A'")) { computeE2(E2.A()) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'E2.A': No enum entry found for symbol '/E2.A'")) { computeE2(E2_C()) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'E2.A': No enum entry found for symbol '/E2.A'")) { computeE2(E2.B()) }
|
||||
|
||||
expectSuccess("ClassToObject") { computeSI2(SI2.ClassToObject) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'ObjectToClass': 'ObjectToClass' is class while object is expected")) { computeSI2(SI2.ObjectToClass()) }
|
||||
|
||||
expectSuccess("ClassToObject") { computeSC2(SC2.ClassToObject) }
|
||||
expectFailure(linkage("Can not get instance of singleton 'ObjectToClass': 'ObjectToClass' is class while object is expected")) { computeSC2(SC2.ObjectToClass()) }
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
STEP 1:
|
||||
dependencies: stdlib, lib1, lib2
|
||||
Reference in New Issue
Block a user