HVM icon indicating copy to clipboard operation
HVM copied to clipboard

Tests for panics possibly fail due to hard-coded line numbers

Open edusporto opened this issue 1 year ago • 0 comments

One of our current tests is the following: https://github.com/HigherOrderCO/HVM/blob/f158106d6f3b0fe62b9c36686c8918adf11cf536/tests/snapshots/run__file%40empty.hvm.snap#L1-L9

It's expected to fail and panic, though the line in which it panics is hard-coded (see line 7). This is an issue when adding code to the relevant file (in this case, ast.rs).

It's not too bad right now since we can just change the relevant tests when editing specific files, though it could become a larger problem when we have a large test suite.

Bend does golden tests in a similar way, maybe this issue is solved over in that repo?

edusporto avatar Jun 04 '24 19:06 edusporto