test for abstract property
This commit is contained in:
@@ -111,7 +111,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
|
||||
public void testPropertyReceiverOnStack() throws Exception {
|
||||
loadFile();
|
||||
System.out.println(generateToText());
|
||||
final Class aClass = loadImplementationClass(generateClassesInFile(), "Evaluator");
|
||||
final Constructor constructor = aClass.getConstructor(StringBuilder.class);
|
||||
StringBuilder sb = new StringBuilder("xyzzy");
|
||||
@@ -120,4 +119,11 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
Integer result = (Integer) method.invoke(instance);
|
||||
assertEquals(5, result.intValue());
|
||||
}
|
||||
|
||||
public void testAbstractVal() throws Exception {
|
||||
loadText("class Foo { public abstract val x: String }");
|
||||
final Codegens codegens = generateClassesInFile();
|
||||
final Class aClass = loadClass("Foo", codegens);
|
||||
assertNotNull(aClass.getMethod("getX"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user