diff options
| -rw-r--r-- | src/test/java/org/zwobble/couscous/tests/CompilerTests.java | 13 | ||||
| -rw-r--r-- | src/test/resources/java/static-method-overloads/com/example/StaticMethodOverloads.java | 11 |
2 files changed, 24 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 6b0bf5f..4caa687 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; @@ -132,6 +133,18 @@ public abstract class CompilerTests { asList(value(2)))); } + @Test + @Ignore("WIP") + public void staticMethodOverloads() throws Exception { + assertEquals( + value(42), + execTestProgram( + "static-method-overloads", + TypeName.of("com.example.StaticMethodOverloads"), + "value", + asList())); + } + private PrimitiveValue execTestProgram( String directoryName, TypeName type, diff --git a/src/test/resources/java/static-method-overloads/com/example/StaticMethodOverloads.java b/src/test/resources/java/static-method-overloads/com/example/StaticMethodOverloads.java new file mode 100644 index 0000000..657b119 --- /dev/null +++ b/src/test/resources/java/static-method-overloads/com/example/StaticMethodOverloads.java @@ -0,0 +1,11 @@ +package com.example; + +public class StaticMethodOverloads { + public static int value() { + return value(21); + } + + public static int value(int x) { + return x * 2; + } +} |
