From 617e4665e2411c00d4ae010d86f0c2f9e5da10ce Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 27 Dec 2023 15:38:46 +0000 Subject: Use appropriate relocation type for memory addresses --- .../backends/wasm/structure/binary/WasmBinaryWriterTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/test/java') diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriterTests.java b/src/test/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriterTests.java index b481cf2d..aeae0d24 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriterTests.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/structure/binary/WasmBinaryWriterTests.java @@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test; import org.shedlang.compiler.backends.wasm.structure.ast.linking.WasmMemoryAddress; import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmFuncName; import org.shedlang.compiler.backends.wasm.structure.ast.modules.WasmModule; +import org.shedlang.compiler.backends.wasm.structure.ast.types.WasmIndexType; import java.io.IOException; @@ -20,7 +21,10 @@ public class WasmBinaryWriterTests { IllegalStateException.class, () -> writer.writeSection( WasmSectionId.TYPE, - () -> writer.writeMemoryAddressConst(new WasmMemoryAddress("x")) + () -> writer.writeMemoryAddressConst( + WasmIndexType.I32, + new WasmMemoryAddress("x") + ) ) ); -- cgit v1.2.3