Remove tests on RTTI
It was never implemented
This commit is contained in:
committed by
Alexander Udalov
parent
0df71bd696
commit
de37f73c8d
@@ -39,7 +39,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
final Class aClass = loadClass("SimpleClass", generateClassesInFile());
|
||||
final Method[] methods = aClass.getDeclaredMethods();
|
||||
// public int SimpleClass.foo()
|
||||
// public jet.TypeInfo SimpleClass.getTypeInfo()
|
||||
assertEquals(1, methods.length);
|
||||
}
|
||||
|
||||
@@ -204,13 +203,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
blackBoxFile("classes/classObjectInTrait.kt");
|
||||
}
|
||||
|
||||
/*
|
||||
public void testClassObjectMethod() {
|
||||
// todo to be implemented after removal of type info
|
||||
// blackBoxFile("classes/classObjectMethod.kt");
|
||||
}
|
||||
*/
|
||||
|
||||
public void testClassObjectInterface() throws Exception {
|
||||
loadFile("classes/classObjectInterface.kt");
|
||||
final Method method = generateFunction();
|
||||
|
||||
@@ -55,16 +55,6 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
assertTrue((Boolean) foo.invoke(null, newRunnable()));
|
||||
}
|
||||
|
||||
public void testIsWithGenerics() throws Exception {
|
||||
// TODO: http://youtrack.jetbrains.net/issue/KT-612
|
||||
if (true) return;
|
||||
|
||||
loadFile();
|
||||
// System.out.println(generateToText());
|
||||
Method foo = generateFunction();
|
||||
assertFalse((Boolean) foo.invoke(null));
|
||||
}
|
||||
|
||||
public void testNotIsOperator() throws Exception {
|
||||
loadText("fun foo(x: Any) = x !is Runnable");
|
||||
Method foo = generateFunction();
|
||||
@@ -72,62 +62,14 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
assertFalse((Boolean) foo.invoke(null, newRunnable()));
|
||||
}
|
||||
|
||||
public void testIsWithGenericParameters() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// loadFile();
|
||||
// Method foo = generateFunction();
|
||||
// assertFalse((Boolean) foo.invoke(null));
|
||||
public void testAsInLoop() {
|
||||
blackBoxFile("typeInfo/asInLoop.kt");
|
||||
}
|
||||
|
||||
public void testIsTypeParameter() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("typeInfo/isTypeParameter.kt");
|
||||
}
|
||||
|
||||
public void testAsSafeWithGenerics() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// loadFile();
|
||||
// Method foo = generateFunction();
|
||||
// assertNull(foo.invoke(null));
|
||||
}
|
||||
|
||||
public void testAsInLoop() throws Exception {
|
||||
loadFile();
|
||||
generateFunction(); // assert no exception
|
||||
}
|
||||
|
||||
public void testPrimitiveTypeInfo() throws Exception {
|
||||
public void testPrimitiveTypeInfo() {
|
||||
blackBoxFile("typeInfo/primitiveTypeInfo.kt");
|
||||
}
|
||||
|
||||
public void testNullability() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("typeInfo/nullability.kt");
|
||||
}
|
||||
|
||||
public void testGenericFunction() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("typeInfo/genericFunction.kt");
|
||||
}
|
||||
|
||||
public void testForwardTypeParameter() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("typeInfo/forwardTypeParameter.kt");
|
||||
}
|
||||
|
||||
public void testClassObjectInTypeInfo() throws Exception {
|
||||
/*
|
||||
loadFile();
|
||||
// System.out.println(generateToText());
|
||||
Method foo = generateFunction();
|
||||
JetObject jetObject = (JetObject) foo.invoke(null);
|
||||
TypeInfo<?> typeInfo = jetObject.getTypeInfo();
|
||||
final Object object = typeInfo.getClassObject();
|
||||
final Method classObjFoo = object.getClass().getMethod("foo");
|
||||
assertNotNull(classObjFoo);
|
||||
*/
|
||||
}
|
||||
|
||||
private Runnable newRunnable() {
|
||||
return new Runnable() {
|
||||
@Override
|
||||
@@ -136,34 +78,15 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
public void testKt259() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("regressions/kt259.kt");
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
|
||||
public void testKt511() throws Exception {
|
||||
public void testKt511() {
|
||||
blackBoxFile("regressions/kt511.kt");
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
|
||||
public void testInner() throws Exception {
|
||||
blackBoxFile("typeInfo/inner.kt");
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
|
||||
public void testKt2811() throws Exception {
|
||||
public void testKt2811() {
|
||||
blackBoxFile("typeInfo/kt2811.kt");
|
||||
}
|
||||
|
||||
public void testInheritance() throws Exception {
|
||||
public void testInheritance() {
|
||||
blackBoxFile("typeInfo/inheritance.kt");
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
|
||||
public void testkt1113() throws Exception {
|
||||
// todo: obsolete with typeinfo removal
|
||||
// blackBoxFile("regressions/kt1113.kt");
|
||||
// System.out.println(generateToText());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user