try to fix VarArgTest

Accoring to spec array of class.getMethods() is not sorted, so we can't just call
getMethods()[0] to get desired method.
This commit is contained in:
Stepan Koltsov
2011-11-25 22:31:29 +04:00
parent 0bd0932282
commit a6eeb01b64
3 changed files with 23 additions and 8 deletions
@@ -487,7 +487,7 @@ public class NamespaceGenTest extends CodegenTestCase {
public void testTupleLiteral() throws Exception {
loadText("fun foo() = (1, \"foo\")");
// System.out.println(generateToText());
final Method main = generateFunction();
final Method main = generateFunction("foo");
Tuple2 tuple2 = (Tuple2) main.invoke(null);
assertEquals(1, tuple2._1);
assertEquals("foo", tuple2._2);