From c2cdddeb6abc41ed9bf4209aeeb5bbb44eb9b5e2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Oct 2023 20:29:07 +0100 Subject: Remove spurious test --- .../StackCompilerStructDefinitionTests.java | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'src/test/java') 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") - )); - } } -- cgit v1.2.3