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

Make tests comparing AST auth logic trees use operator== rather than equality of debug prints. #676

Closed
markww opened this issue Aug 19, 2022 · 1 comment
Assignees

Comments

@markww
Copy link
Contributor

markww commented Aug 19, 2022

In #643 , we added a visitor for the authorization logic AST. The test for this compared a large number of debug printed strings from the AST nodes, which were introduced for this purpose alone. This isn't great, as if the test fails, a reader must parse a lot of text in their heads to diagnose how the failure occurred. In addition, debug printing usually means printing for debugging, which usually does not imply any particular stability requirements for tests, making these tests

The relevant AST nodes should be refactored to just have an operator== and for those tests to compared via those operator==. If the test fails, someone can always insert print statements or go to the debugger to discover why the test is misbehaving.

@bgogul
Copy link
Collaborator

bgogul commented Nov 4, 2022

This is done.

@bgogul bgogul closed this as completed Nov 4, 2022
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

3 participants