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

document testing story #12

Open
rbtcollins opened this issue Jul 17, 2021 · 2 comments
Open

document testing story #12

rbtcollins opened this issue Jul 17, 2021 · 2 comments

Comments

@rbtcollins
Copy link

pest_consume doesn't include any testing support macros; its not clear what the best / typical practice is - to write tests on top of the high level API, or to derive a second struct from the same grammar with pest_derive and use pest macros to do unit testing of that grammar...

@Nadrieril
Copy link
Owner

Hm, I never considered unit testing a grammar but that sounds useful. I don't have a use for it so I won't write it myself, but I'd welcome a contribution of some simple testing macros

@spencerpogo
Copy link

Personally, I pass in inputs and then assert that they produce a certain AST or error in a certain way and it works for me.

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