Skip to content

Commit

Permalink
Renamed Jack test classes, commented non-compiling nested class tests
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jul 23, 2015
1 parent 3910be4 commit f0478a3
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 69 deletions.
4 changes: 2 additions & 2 deletions compiler/src/main/java/org/robovm/compiler/config/Config.java
Expand Up @@ -225,8 +225,8 @@ protected Config() throws IOException {
new ObjCMemberPlugin(),
new ObjCBlockPlugin(),
new AnnotationImplPlugin(),
new LambdaPlugin()
// new org.robovm.compiler.plugin.lambda2.LambdaPlugin()
// new LambdaPlugin()
new org.robovm.compiler.plugin.lambda2.LambdaPlugin()
));
this.loadPluginsFromClassPath();
}
Expand Down
100 changes: 51 additions & 49 deletions tests/robovm/src/test/java/org/robovm/rt/lambdas/Java8Test.java
Expand Up @@ -351,48 +351,48 @@ int goo() {
assertEquals(42, new X().goo());
}

static class X2 {
protected int field;
void foo() {
int local;
class Y extends X2 {
class Z extends X2 {
void f() {
Ctor c = X2::new;
X2 x = c.makeX(123456);
assertEquals(123456, x.field);
c = Y::new;
x = c.makeX(987654);
x = new Y(987654);
assertEquals(987655, x.field);
c = Z::new;
x = c.makeX(456789);
x = new Z(456789);
assertEquals(456791, x.field);
}
private Z(int z) {
super(z + 2);
}
Z() {
}
}

private Y(int y) {
super(y + 1);
}

private Y() {
}
}
new Y().new Z().f();
}

private X2(int x) {
this.field = x;
}
X2() {
}
}
// static class X2 {
// protected int field;
// void foo() {
// int local;
// static class Y extends X2 {
// static class Z extends X2 {
// void f() {
// Ctor c = X2::new;
// X2 x = c.makeX(123456);
// assertEquals(123456, x.field);
// c = Y::new;
// x = c.makeX(987654);
// x = new Y(987654);
// assertEquals(987655, x.field);
// c = Z::new;
// x = c.makeX(456789);
// x = new Z(456789);
// assertEquals(456791, x.field);
// }
// private Z(int z) {
// super(z + 2);
// }
// Z() {
// }
// }
//
// private Y(int y) {
// super(y + 1);
// }
//
// private Y() {
// }
// }
// new Y().new Z().f();
// }
//
// private X2(int x) {
// this.field = x;
// }
// X2() {
// }
// }

@Test public void testSuperReferenceExpressionWithVarArgs() {
class Base {
Expand All @@ -414,13 +414,15 @@ void goo() {
new X().goo();
}

interface Ctor {
X2 makeX(int x);
}

@Test public void testPrivateConstructorReference() {
new X2().foo();
}
// interface Ctor {
// X2 makeX(int x);
// }

// RoboVM Note: uncomment once the nested classes
// situation above is resolved.
// @Test public void testPrivateConstructorReference() {
// new X2().foo();
// }

@Test public void testDefaultInterfaceMethod() {
assertEquals(42, new DefaultInterfaceImpl().method2());
Expand Down
Expand Up @@ -66,7 +66,7 @@ interface O {
/**
* Lambda expression test without parameters.
*/
public class Test001_NoParameters {
public class NoParametersTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -59,7 +59,7 @@ interface M {
String add(boolean b, byte by, char c, short s, int i, long l, float f, double d, String o);
}

public class Test002_NoneCaptureParameters {
public class NoneCaptureParametersTest {
@Test
public void testNonCaptureParameters() {
B bo = (a, b) -> a && b;
Expand Down
Expand Up @@ -57,7 +57,7 @@ public int add(int a) {
}
}

public class Test003_CaptureFieldsLocals {
public class CaptureFieldsLocalsTest {

@Test
public void test003() {
Expand Down
Expand Up @@ -23,7 +23,7 @@ interface I {
int add();
}

public class Test04_Casting {
public class CastingTest {

@Test
public void test004() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda expression with generic.
*/
public class Tests {
public class LambdaGenericsTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Test that mixed lambda with non lambda expression of the same type.
*/
public class Tests {
public class MixedLambdaTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -24,7 +24,7 @@
* Test returning a lambda expression accessing local values that will be used outside his
* definition scope.
*/
public class Tests {
public class LambdaScopeTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Test that check that boxing work in lambda body and that return type with generic works properly
*/
public class Tests {
public class BoxingTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Test using exception with lambda.
*/
public class Tests {
public class LambdaExceptionTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda with obfuscation to check that MethodId is well managed
*/
public class Tests {
public class ObfuscationTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda accessing super members.
*/
public class Tests {
public class SuperMemberTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda expression into another lambda expression.
*/
public class Tests {
public class NestedLambdaTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda specifying parameter types.
*/
public class Tests {
public class ParameterTypeTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda mixing vararg and array.
*/
public class Tests {
public class VarArgTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Nested lambda expression.
*/
public class Tests {
public class NestedExpressionTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Lambda expression into array initializer.
*/
public class Tests {
public class ArrayInitializerTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -22,7 +22,7 @@
/**
* Use parameter type of lambda when type inference could not select the right type
*/
public class Tests {
public class TypeInferenceTest {

@Test
public void test001() {
Expand Down
Expand Up @@ -24,7 +24,7 @@
/**
* Test target typing with overloading methods.
*/
public class Tests {
public class OverloadTest {

@Test
public void test001() {
Expand Down

0 comments on commit f0478a3

Please sign in to comment.