From 74e9c6e50b42c1d9f5a7988a4312f534534bbd52 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 21 Dec 2025 13:22:53 +0100 Subject: [PATCH] test_compile updated to read variables instead of raw memory --- tests/test_compile_div.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_compile_div.py b/tests/test_compile_div.py index ff702fa..717db36 100644 --- a/tests/test_compile_div.py +++ b/tests/test_compile_div.py @@ -1,5 +1,5 @@ from copapy import value, NumLike -from copapy.backend import Write, compile_to_dag +from copapy.backend import Write, compile_to_dag, add_read_command, Net import copapy import subprocess from copapy import _binwrite @@ -28,14 +28,14 @@ def test_compile(): out = [Write(r) for r in ret] - il, _ = compile_to_dag(out, copapy.generic_sdb) + il, vars = compile_to_dag(out, copapy.generic_sdb) # run program command il.write_com(_binwrite.Command.RUN_PROG) - il.write_com(_binwrite.Command.READ_DATA) - il.write_int(0) - il.write_int(36) + for net in ret: + assert isinstance(net, Net) + add_read_command(il, vars, net) il.write_com(_binwrite.Command.END_COM)