aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-01 16:32:31 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-01 16:32:31 +0000
commit02aa9530cf8d96f2d651b47e93961591b8060b8b (patch)
treea423171c75729c6950d69034316fa21f98b09e23 /src/test/java/org/zwobble
parentfd0769bde1ffad49ca74a404f18aae5d7226c558 (diff)
Add reading of references to static methods
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/couscous/tests/frontends/java/JavaReaderTests.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/couscous/tests/frontends/java/JavaReaderTests.java b/src/test/java/org/zwobble/couscous/tests/frontends/java/JavaReaderTests.java
index 302ae40..3aab776 100644
--- a/src/test/java/org/zwobble/couscous/tests/frontends/java/JavaReaderTests.java
+++ b/src/test/java/org/zwobble/couscous/tests/frontends/java/JavaReaderTests.java
@@ -1,5 +1,6 @@
package org.zwobble.couscous.tests.frontends.java;
+import org.junit.Ignore;
import org.junit.Test;
import org.zwobble.couscous.ast.*;
import org.zwobble.couscous.frontends.java.JavaReader;
@@ -184,6 +185,16 @@ public class JavaReaderTests {
readClasses(generateMethodSource("void",
"java.util.function.Function<Integer, Integer> function = (Integer x) -> x;")));
}
+
+ @Ignore("This works except for making the IDs match up")
+ @Test
+ public void expressionMethodReferenceIsReadAsLambda() {
+ assertEquals(
+ readClasses(generateMethodSource("void",
+ "java.util.function.Function<String, Integer> function = arg0 -> Integer.parseInt(arg0);")),
+ readClasses(generateMethodSource("void",
+ "java.util.function.Function<String, Integer> function = Integer::parseInt;")));
+ }
@Test
public void argumentIsBoxedIfNecessary() {