HigherOrderCO / HVM

A massively parallel, optimal functional runtime in Rust
https://higherorderco.com
Apache License 2.0
10.52k stars 400 forks source link

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

Open edusporto opened 5 months ago

edusporto commented 5 months ago

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?