some debug print commented out

This commit is contained in:
Alex Tkachman
2011-11-25 10:50:33 +02:00
parent 21a0d1f85c
commit dce0746bd9
15 changed files with 126 additions and 131 deletions
@@ -9,7 +9,7 @@ import java.lang.reflect.Method;
public class VarArgTest extends CodegenTestCase {
public void testStringArray () throws InvocationTargetException, IllegalAccessException {
loadText("fun test(vararg ts: String) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
String[] args = {"mama", "papa"};
assertTrue(args == main.invoke(null, new Object[]{ args } ));
@@ -17,7 +17,7 @@ public class VarArgTest extends CodegenTestCase {
public void testIntArray () throws InvocationTargetException, IllegalAccessException {
loadText("fun test(vararg ts: Int) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
int[] args = {3, 4};
assertTrue(args == main.invoke(null, new Object[]{ args }));
@@ -25,7 +25,7 @@ public class VarArgTest extends CodegenTestCase {
public void testIntArrayKotlinNoArgs () throws InvocationTargetException, IllegalAccessException {
loadText("fun test() = testf(); fun testf(vararg ts: Int) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
Object res = main.invoke(null);
assertTrue(((int[])res).length == 0);
@@ -33,7 +33,7 @@ public class VarArgTest extends CodegenTestCase {
public void testIntArrayKotlin () throws InvocationTargetException, IllegalAccessException {
loadText("fun test() = testf(239, 7); fun testf(vararg ts: Int) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
Object res = main.invoke(null);
assertTrue(((int[])res).length == 2);
@@ -43,7 +43,7 @@ public class VarArgTest extends CodegenTestCase {
public void testNullableIntArrayKotlin () throws InvocationTargetException, IllegalAccessException {
loadText("fun test() = testf(239.byt, 7.byt); fun testf(vararg ts: Byte?) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
Object res = main.invoke(null);
assertTrue(((Byte[])res).length == 2);
@@ -53,7 +53,7 @@ public class VarArgTest extends CodegenTestCase {
public void testIntArrayKotlinObj () throws InvocationTargetException, IllegalAccessException {
loadText("fun test() = testf(\"239\"); fun testf(vararg ts: String) = ts");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
Object res = main.invoke(null);
assertTrue(((String[])res).length == 1);
@@ -62,7 +62,7 @@ public class VarArgTest extends CodegenTestCase {
public void testArrayT () throws InvocationTargetException, IllegalAccessException {
loadText("fun test() = _array(2, 4); fun <T> _array(vararg elements : T) = elements");
System.out.println(generateToText());
// System.out.println(generateToText());
final Method main = generateFunction();
Object res = main.invoke(null);
assertTrue(((Integer[])res).length == 2);