-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use toml for test cases #5
Comments
lit is written in python and available on pip. To reproduce the llvm testing experience we also need filecheck [2] which is written in C++. I'm not sure if it is worth the effort or if it is used outside of llvm. |
We should definitely find a way to avoid repeating the test cases everywhere. On the replicad Babeljs transform I started using testing tool that let me just write input and expected output examples as files. The runner is specific to Babeljs but we could follow this pattern and start making a fixtures directory with Otherwise I am always partial to Haskell solutions but a bit wary of managing a Haskell dependency. I'd want to be sure it's worth it. LLVM-lit looks good too but if we need to pull in an extra CPP file and compile it it might not be the right solution (but maybe it compiles easily and it's worth it, not sure yet). |
Isn't there a better way to do nesting in TOML? https://github.com/toml-lang/toml#array-of-tables |
this wouldn't be nice: [10k +-10%]
['10k +-10%'.result]
type = 'resistor'
tolerance = 10 we can go with [[test]]
input = '10k +-10%'
[test.result]
type = 'resistor'
tolerance = 10 |
I would suggest aligning with #9 [test-suite]
parser = 'strict'
rule = 'all_packages'
describe = 'chip packages'
[[test]]
it = 'parses 0805'
[test.cases]
metric = '0805'
imperial = '2012'
[test.output]
warnings = ["ambigous_size"]
ignored = ''
[test.output.result]
package = '0805' This repl type thing is handy for sketching btw. |
If our grammar is language agnostic so should the test cases.
The text was updated successfully, but these errors were encountered: