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

Implement tests for ASR verify #4037

Open
certik opened this issue May 19, 2024 · 0 comments
Open

Implement tests for ASR verify #4037

certik opened this issue May 19, 2024 · 0 comments

Comments

@certik
Copy link
Contributor

certik commented May 19, 2024

Right now ASR verify is not tested at all. A well functioning AST->ASR pass as well as correct ASR->ASR passes will never trigger any ASR verify errors. However, we still need to ensure that ASR verify works correctly.

I think we can't test this with the frontend langauge code (Fortran). Rather, we must construct incorrect ASR directly and run ASR verify pass on it and ensure it fails.

One approach is to add C++ tests (executed via ctest) that construct ASR (either directly or via our builder), and check that ASR fails. Even more thorough test would be to check that it fails with the correct error message.

We can add some initial tests for the most important checks (regarding symbol table mostly). However we do not want to add too many, since it will increase our maintenance burden, as every time we change ASR we then have to manually change all these tests. I think we should do that after all big refactorings are done, so after beta, possibly closer to alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant