Remove obsolete codegen test data
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.jet.codegen;
|
||||
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -36,9 +37,9 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testPSVM() throws Exception {
|
||||
loadFile("PSVM.kt");
|
||||
loadText("fun main(args: Array<String>) { }");
|
||||
Method main = generateFunction();
|
||||
Object[] args = new Object[] { new String[0] };
|
||||
Object[] args = new Object[] {ArrayUtil.EMPTY_STRING_ARRAY};
|
||||
main.invoke(null, args);
|
||||
}
|
||||
|
||||
@@ -56,13 +57,6 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
assertEquals(new Integer(50), returnValue);
|
||||
}
|
||||
|
||||
public void testLocalProperty() throws Exception {
|
||||
loadFile("localProperty.kt");
|
||||
Method main = generateFunction();
|
||||
Object returnValue = main.invoke(null, 76);
|
||||
assertEquals(new Integer(50), returnValue);
|
||||
}
|
||||
|
||||
public void testCurrentTime() throws Exception {
|
||||
loadText("fun f() : Long { return System.currentTimeMillis(); }");
|
||||
Method main = generateFunction();
|
||||
@@ -79,24 +73,12 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testSystemOut() throws Exception {
|
||||
loadFile("systemOut.kt");
|
||||
loadText("fun f() : Any? { return System.out; }");
|
||||
Method main = generateFunction();
|
||||
Object returnValue = main.invoke(null);
|
||||
assertEquals(returnValue, System.out);
|
||||
}
|
||||
|
||||
public void testHelloWorld() throws Exception {
|
||||
loadFile("helloWorld.kt");
|
||||
generateFunction(); // assert that it can be verified
|
||||
}
|
||||
|
||||
public void testAssign() throws Exception {
|
||||
loadFile("assign.kt");
|
||||
|
||||
Method main = generateFunction();
|
||||
assertEquals(2, main.invoke(null));
|
||||
}
|
||||
|
||||
public void testBoxedInt() throws Exception {
|
||||
loadText("fun foo(a: Int?) = if (a != null) a else 239");
|
||||
Method main = generateFunction();
|
||||
@@ -172,12 +154,6 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
assertTrue(hadException);
|
||||
}
|
||||
|
||||
public void testBottles2() throws Exception {
|
||||
loadFile("bottles2.kt");
|
||||
Method main = generateFunction();
|
||||
main.invoke(null); // ensure no exception
|
||||
}
|
||||
|
||||
public void testJavaConstructor() throws Exception {
|
||||
loadText("fun foo(): StringBuilder = StringBuilder()");
|
||||
Method main = generateFunction();
|
||||
@@ -239,12 +215,6 @@ public class PackageGenTest extends CodegenTestCase {
|
||||
assertEquals(Boolean.TRUE, main.invoke(null, s1, s2));
|
||||
}
|
||||
|
||||
public void testFunctionCall() throws Exception {
|
||||
loadFile("functionCall.kt");
|
||||
Method main = generateFunction("f");
|
||||
assertEquals("foo", main.invoke(null));
|
||||
}
|
||||
|
||||
public void testStringPlus() throws Exception {
|
||||
loadText("fun foo(s1: String, s2: String) = s1 + s2");
|
||||
Method main = generateFunction();
|
||||
|
||||
@@ -261,12 +261,6 @@ public class PrimitiveTypesTest extends CodegenTestCase {
|
||||
assertEquals(6L, main.invoke(null, 2L));
|
||||
}
|
||||
|
||||
public void testDecrementAsStatement() throws Exception {
|
||||
loadFile("bottles.kt");
|
||||
Method main = generateFunction();
|
||||
main.invoke(null); // ensure no exception
|
||||
}
|
||||
|
||||
private void binOpTest(String text, Object arg1, Object arg2, Object expected) throws Exception {
|
||||
loadText(text);
|
||||
Method main = generateFunction();
|
||||
|
||||
@@ -1770,6 +1770,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("bottles.kt")
|
||||
public void testBottles() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/bottles.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compareBoxedIntegerToZero.kt")
|
||||
public void testCompareBoxedIntegerToZero() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt");
|
||||
|
||||
Reference in New Issue
Block a user