diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-10-01 20:29:07 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-10-01 20:29:07 +0100 |
| commit | c2cdddeb6abc41ed9bf4209aeeb5bbb44eb9b5e2 (patch) | |
| tree | df91b7ca6ca045974a3c4853e0adf720e39adc90 /src/test/java | |
| parent | 1fd59a1848a70d8ba4824f3a0393a702be3c244e (diff) | |
Remove spurious test
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") - )); - } } |
