mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
test for abstract method calls
This commit is contained in:
parent
6e04ade375
commit
1882d016ac
@ -52,6 +52,7 @@ public class StructsNonGC extends AbstractBaseTest {
|
|||||||
addParam( list, script, "useGlobalObject" );
|
addParam( list, script, "useGlobalObject" );
|
||||||
addParam( list, script, "multipleAssign" );
|
addParam( list, script, "multipleAssign" );
|
||||||
addParam( list, script, "getDefaultValue" );
|
addParam( list, script, "getDefaultValue" );
|
||||||
|
addParam( list, script, "callAbstractMethod" );
|
||||||
addParam( list, script, "instanceof1" );
|
addParam( list, script, "instanceof1" );
|
||||||
addParam( list, script, "instanceof2" );
|
addParam( list, script, "instanceof2" );
|
||||||
addParam( list, script, "instanceof3" );
|
addParam( list, script, "instanceof3" );
|
||||||
@ -151,6 +152,12 @@ public class StructsNonGC extends AbstractBaseTest {
|
|||||||
return val.getDefault();
|
return val.getDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static int callAbstractMethod() {
|
||||||
|
Ab val = new Abc2();
|
||||||
|
return val.abstractBar();
|
||||||
|
}
|
||||||
|
|
||||||
@Export
|
@Export
|
||||||
static boolean instanceof1() {
|
static boolean instanceof1() {
|
||||||
Object obj = new Object();
|
Object obj = new Object();
|
||||||
@ -210,7 +217,11 @@ public class StructsNonGC extends AbstractBaseTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Abc implements TestDefault {
|
static abstract class Ab {
|
||||||
|
abstract int abstractBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
static class Abc extends Ab implements TestDefault {
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
long b;
|
long b;
|
||||||
@ -222,6 +233,11 @@ public class StructsNonGC extends AbstractBaseTest {
|
|||||||
void bar() {
|
void bar() {
|
||||||
a = 2;
|
a = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int abstractBar() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Abc2 extends Abc {
|
static class Abc2 extends Abc {
|
||||||
@ -230,5 +246,10 @@ public class StructsNonGC extends AbstractBaseTest {
|
|||||||
void bar() {
|
void bar() {
|
||||||
a = 3;
|
a = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int abstractBar() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user