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

Generator tests #312

Open
RagnarGrootKoerkamp opened this issue Sep 20, 2023 · 0 comments
Open

Generator tests #312

RagnarGrootKoerkamp opened this issue Sep 20, 2023 · 0 comments

Comments

@RagnarGrootKoerkamp
Copy link
Owner

RagnarGrootKoerkamp commented Sep 20, 2023

Sometimes generators have bugs where they generate valid but unintended data, and you only find them after a while by inspecting the generated .in files manually.

Maybe we could come up with some simple and clean way to test that generators do what was intended. Maybe something like the following in generators.yaml:

tests:
  - command: linear_sequence.py 10 5
    contains: 
      - "0 5 10"
      - "45 50\n"

On the other hand, I'm not exactly sure how useful it is to only be able test for substring containment. But writing code to detect arbitrary patterns and executing that sounds like a lot of overhead.

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