-
Notifications
You must be signed in to change notification settings - Fork 39
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
Accept external test suite files to generate test cases #89
Comments
Hmmm.... We are talking here about loading and parsing a CSV file in proc macro. Which means it would be similar to That would definitely make the compilation time longer. Also, I would not implement just CSV processing. The whole feature would have to be generic. I do not want to support N different file formats. @luke-biel what do you think? |
I agree that more file formats would be ideal. About compilation time, that is an issue but could be document and the feature be kept behind a feature flag. |
#78 seems related. There are rough plans into turning Issues like this definitely help clarify requirements. Some thoughts:
Definitely need to think about this more. |
What problems do you foresee? |
The procedural macro has no access to the TestInput structure. It would only have an identifier. |
I see this as a design limitation. First as @frondeus mentioned, this requires " Overall it's not a big deal, I put it there to remember later. |
Before I saw this ticket, I began work on a separate crate to provide this specific feature: test_vectors It is not yet in working condition, but it may be a good proving ground for a feature in |
I'd be happy to take a look at test_vectors in the future and if possible merge that into test case :D I appreciate the interest. |
I haven't revived that project, and I do recall one or more blockers. One I saw you commenting on in rust-internals about build caching behavior for including files (if a non So I can't necessarily recommend that implementation. Maybe the API. ;-) I was starting with I should note, one motivation for raw |
I don't know if this matches the plan for the crate but I though it is suitable.
The QA in the project I work on have a
csv
file with test cases input/output:I wanted to use it to generate test cases in rust, I was thinking about something like:
This would generate:
The text was updated successfully, but these errors were encountered: