Closed fugkco closed 2 years ago
@fugkco great idea! Do you know if any other project implement something similar to take as an example?
If there would be YAML or JSON tests those formats would have to be specified pretty exact. The specified examples should be in a pretty easy format that also allows lossless conversion to and from recipes. This format could be different than the AST in the Swift implementation.
@umgefahren I started extracting test-cases into YAML format https://github.com/cooklang/CookInSwift/pull/10/files#diff-108cc582ddc8fb36abf94aa6a115396b00fe3465cfad02ba7a269e005f3a1429. I'm curious if that what you meant?
Extracted tests, closing the issue.
It would be nice to separate out the test cases and the expected results for them into a separate file that's parseable outside of Swift. Something like YAML or JSON format. This allows others to implement this in other languages and rely on the same the cases to validate their implementation.