FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
358 stars 88 forks source link

Use `proptest` for deserialisation and serialisation tests #717

Open xgreenx opened 7 months ago

xgreenx commented 7 months ago

In the codebase, we have many places where we try to generate different types of transactions with different inputs and see that we can serialize/deserialize them properly.

Instead of doing that manually we can use the proptest framework to generate transactions.

https://github.com/FuelLabs/fuel-vm/pull/707#discussion_r1556474574 https://github.com/FuelLabs/fuel-vm/pull/707#discussion_r1556478293 https://github.com/FuelLabs/fuel-vm/pull/707#discussion_r1556562692 https://github.com/FuelLabs/fuel-vm/pull/707#discussion_r1556599596

We have this problem for each type of transaction, so it should be a huge refactoring of all tests related to serialization and deserialization.