diff options
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/stackir/StackCompilerStructDefinitionTests.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/test/java/org/shedlang/compiler/stackir/StackCompilerStructDefinitionTests.java b/src/test/java/org/shedlang/compiler/stackir/StackCompilerStructDefinitionTests.java index 78a14e2f..3be1b1a5 100644 --- a/src/test/java/org/shedlang/compiler/stackir/StackCompilerStructDefinitionTests.java +++ b/src/test/java/org/shedlang/compiler/stackir/StackCompilerStructDefinitionTests.java @@ -39,27 +39,4 @@ public class StackCompilerStructDefinitionTests { isLocalStoreInstruction("User__0") )); } - - @Test - public void whenLastStatementIsBlockReturnThenThatValueIsReturned() { - var node = TypedFunctionDefinitionNode.builder() - .withName("f") - .addStatement(Typed.blockReturn(Typed.stringLiteral("hello"))) - .build(); - var context = StackCompiler.Context.EMPTY - .addShedVariable("f"); - - var result = StackCompiler.compileNamespaceStatement(node, context); - - assertThat(result.instructions(), isSequence( - instanceOf( - DefineFunctionInstruction.class, - has("body", x -> x.body(), isSequence( - isPushStringInstruction("hello"), - isReturnInstruction() - )) - ), - isLocalStoreInstruction("f__0") - )); - } } |
