aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/couscous/tests/CompilerTests.java12
1 files changed, 12 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 7df7582..0099d26 100644
--- a/src/test/java/org/zwobble/couscous/tests/CompilerTests.java
+++ b/src/test/java/org/zwobble/couscous/tests/CompilerTests.java
@@ -181,6 +181,18 @@ public abstract class CompilerTests {
}
@Test
+ public void lambdasWithSameVariableCapturedMultipleTimes() throws Exception {
+ assertEquals(
+ value(84),
+ execTestProgram(
+ "lambda-multiple-capture",
+ ScalarType.of("com.example.Lambda"),
+ "value",
+ list(value(2)),
+ Types.INT));
+ }
+
+ @Test
public void lambdasWithThisCapture() throws Exception {
assertEquals(
value(42),