backend: add some trivial tests for RTTI
This commit is contained in:
committed by
SvyatoslavScherbina
parent
f147860fea
commit
1ff59e2cd2
@@ -262,3 +262,11 @@ task cycle(type: UnitKonanTest) {
|
||||
task cycle_do(type: UnitKonanTest) {
|
||||
source = "codegen/cycles/cycle_do.kt"
|
||||
}
|
||||
|
||||
task abstract_super(type: UnitKonanTest) {
|
||||
source = "datagen/rtti/abstract_super.kt"
|
||||
}
|
||||
|
||||
task vtable1(type: UnitKonanTest) {
|
||||
source = "datagen/rtti/vtable1.kt"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
extern void *resolve_symbol(const char*);
|
||||
|
||||
int
|
||||
run_test() {
|
||||
// This test now checks that the source can be successfully compiled and linked;
|
||||
// TODO: check the contents of TypeInfo?
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
abstract class Super
|
||||
|
||||
class Foo : Super()
|
||||
@@ -0,0 +1,9 @@
|
||||
extern void *resolve_symbol(const char*);
|
||||
|
||||
int
|
||||
run_test() {
|
||||
// This test now checks that the source can be successfully compiled and linked;
|
||||
// TODO: check the contents of TypeInfo?
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
abstract class Super {
|
||||
abstract fun bar()
|
||||
}
|
||||
|
||||
class Foo : Super() {
|
||||
final override fun bar() {}
|
||||
}
|
||||
Reference in New Issue
Block a user