From cf12234c6f3d022c5e0882a26e6cfd39b45e0abf Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 29 Sep 2015 23:43:45 +0100 Subject: Add builtin method calls with no arguments --- .../couscous/tests/interpreter/InterpreterTests.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/test/java/org/zwobble/couscous/tests/interpreter/InterpreterTests.java') diff --git a/src/test/java/org/zwobble/couscous/tests/interpreter/InterpreterTests.java b/src/test/java/org/zwobble/couscous/tests/interpreter/InterpreterTests.java index 54abd8a..bfdadf8 100644 --- a/src/test/java/org/zwobble/couscous/tests/interpreter/InterpreterTests.java +++ b/src/test/java/org/zwobble/couscous/tests/interpreter/InterpreterTests.java @@ -28,6 +28,14 @@ import static org.zwobble.couscous.values.UnitValue.UNIT; import lombok.val; public class InterpreterTests { + @Test + public void methodWithNoStatementsReturnsUnit() { + val method = staticMethod("hello"); + val result = runMethod(method); + + assertEquals(UNIT, result); + } + @Test public void canReturnLiteralValue() { val method = staticMethod("hello") @@ -69,14 +77,6 @@ public class InterpreterTests { assertEquals(new StringValue("[updated value]"), result); } - - @Test - public void methodWithNoStatementsReturnsUnit() { - val method = staticMethod("hello"); - val result = runMethod(method); - - assertEquals(UNIT, result); - } private InterpreterValue runMethod(MethodNode.MethodNodeBuilder methodBuilder, InterpreterValue... arguments) { val method = methodBuilder.build(); -- cgit v1.2.3