diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-04 17:44:25 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-04 17:44:43 +0000 |
| commit | 909f9d629808da383e6c9e8e514711382cdc331e (patch) | |
| tree | 968a15b6ab893177e708666500cc339c621ae452 /src/test/java/org | |
| parent | e9eb339f96c3b82bcb6e908c7a86364c768c16f2 (diff) | |
Add WIP test for this capture in lambdas
Diffstat (limited to 'src/test/java/org')
| -rw-r--r-- | src/test/java/org/zwobble/couscous/tests/CompilerTests.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/couscous/tests/CompilerTests.java b/src/test/java/org/zwobble/couscous/tests/CompilerTests.java index b5e0d82..56d989c 100644 --- a/src/test/java/org/zwobble/couscous/tests/CompilerTests.java +++ b/src/test/java/org/zwobble/couscous/tests/CompilerTests.java @@ -1,5 +1,6 @@ package org.zwobble.couscous.tests; +import org.junit.Ignore; import org.junit.Test; import org.zwobble.couscous.ast.TypeName; import org.zwobble.couscous.values.PrimitiveValue; @@ -13,6 +14,7 @@ import java.nio.file.Path; import java.util.List; import static java.util.Arrays.asList; +import static java.util.Collections.emptyList; import static org.junit.Assert.assertEquals; import static org.zwobble.couscous.tests.util.ExtraFiles.deleteRecursively; import static org.zwobble.couscous.values.PrimitiveValues.value; @@ -121,6 +123,18 @@ public abstract class CompilerTests { asList(value(2)))); } + @Test + @Ignore("WIP") + public void lambdasWithThisCapture() throws Exception { + assertEquals( + value(42), + execTestProgram( + "lambda-this-capture", + TypeName.of("com.example.Lambda"), + "value", + asList(value(2)))); + } + private PrimitiveValue execTestProgram( String directoryName, TypeName type, |
