tezos-checker / checker

An in-development "robocoin" system for the Tezos blockchain
24 stars 16 forks source link

Add some tests for src/ptr.ml #260

Closed gkaracha closed 3 years ago

gkaracha commented 3 years ago

Two of those (test_ptr_null_is_zero and test_ptr_next_difference) are tied to our implementation of ptr, and the other one is the most important property to have (test_ptr_next_injective).

The tight tests are used primarily to catch untested mutations.

Also remove Ptr.ptr_init since it is not used at all in src/ (though it was used a little in tests/). This reduces the surface area to mutate.

github-actions[bot] commented 3 years ago

Gas costs: No change. Entrypoint sizes: No change. Test coverage: No change.

gkaracha commented 3 years ago

Great, thanks for having a look! :pray: I actually updated the property to be less wasteful, but forgot to update the PR description. I'll merge this one now and when adding tests for mem.ml I'll see if I can add some more tests based on your input above (might apply to mem.ml or liquidationAuctions.ml; we'll see).