Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
edusporto opened this issue Jun 4, 2024 · 0 comments
Open

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

edusporto opened this issue Jun 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@edusporto
Copy link
Contributor

One of our current tests is the following:

---
source: tests/run.rs
expression: rust_output
input_file: tests/programs/empty.hvm
---
exit status: 101
thread 'main' panicked at src/ast.rs:527:41:
missing `@main` definition
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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 edusporto added the enhancement New feature or request label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant