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

Should tests check for error tokens? #929

Closed
dblessing opened this issue Jun 9, 2018 · 5 comments
Closed

Should tests check for error tokens? #929

dblessing opened this issue Jun 9, 2018 · 5 comments
Labels
general-question A question about Rouge. stale-issue There has been no activity for a year.

Comments

@dblessing
Copy link
Collaborator

When reviewing a PR I noticed there was an error token in the sample for the Nix lexer. I originally thought the change caused it so I tested on master, but the problem still existed. I thought automated testing was ensuring there were no error tokens.

When I look at specs it looks like we assert no errors for the demo, but not the sample. Samples we only check to see if it throws an exception.

Are tests supposed to catch error tokens in samples? @gfx @jneen

@miparnisari
Copy link
Contributor

This is exactly why I submitted #852 :)

@stale
Copy link

stale bot commented Jun 19, 2019

This contribution has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.

@stale stale bot added the stale-issue There has been no activity for a year. label Jun 19, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jun 19, 2019

@dblessing I don't think it should be a problem if samples include an error. Not sure if @jneen or @gfx feel differently.

@stale stale bot removed the stale-issue There has been no activity for a year. label Jun 19, 2019
@pyrmont pyrmont added the general-question A question about Rouge. label Jun 19, 2019
@stale
Copy link

stale bot commented Jun 18, 2020

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.
If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

@stale stale bot added the stale-issue There has been no activity for a year. label Jun 18, 2020
@pyrmont
Copy link
Contributor

pyrmont commented Jun 19, 2020

Having had the benefit of working on this codebase for a year, I'm confident the answer to this should be no. There are samples that intentionally include errors to check the way error tokens work.

@pyrmont pyrmont closed this as completed Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general-question A question about Rouge. stale-issue There has been no activity for a year.
Projects
None yet
Development

No branches or pull requests

3 participants