Closed Fumuran closed 1 month ago
The main question is where we should locate the tests for the Program
serde.
I think that it would be better to construct the Program
from source string to make sure we don't have any bug on the stage of creation of the original Program
instance, but in that case we should be able to use Assembler
and test-utils
. I decided to put tests in the miden integration tests folder, but not sure that this is the best option.
The main question is where we should locate the tests for the
Program
serde. I think that it would be better to construct theProgram
from source string to make sure we don't have any bug on the stage of creation of the originalProgram
instance, but in that case we should be able to useAssembler
andtest-utils
. I decided to put tests in the miden integration tests folder, but not sure that this is the best option.
Could it not go into the assembly
crate?
Could it not go into the
assembly
crate?
Essentially we are testing the functionality of the Program
structure, which is part of the core
, so it's strange for me to add tests to the assembly
. But it is strange to add it anywhere, so probably we just should chose where it will suit better. I can move it to the assembly
if you think that it will be better.
Essentially we are testing the functionality of the
Program
structure, which is part of thecore
, so it's strange for me to add tests to theassembly
. But it is strange to add it anywhere, so probably we just should chose where it will suit better. I can move it to theassembly
if you think that it will be better.
Agreed that ideally it should be in core
- but I think putting it into assembly
simplifies testing - so, let's put it there.
This small PR fixes a bug in the
Program
deserialization. It also adds some integration tests to check the correctness of the serialization and deserialization of theProgram
structure.