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

Write unit tests for parse-events #5

Open
daveyarwood opened this issue Feb 18, 2021 · 0 comments
Open

Write unit tests for parse-events #5

daveyarwood opened this issue Feb 18, 2021 · 0 comments

Comments

@daveyarwood
Copy link
Owner

daveyarwood commented Feb 18, 2021

parse-events (implemented by @wcerfgba in #4) uses the Alda v2 alda parse events output to produce alda-clj event records from Alda input (which could take the form of alda-clj event records and/or strings of Alda code, since ->str is used internally by parse-events)

It would be nice to have unit tests for this, especially since they would be easy to write.

To test:

  • Equivalence of strings of Alda code and the result of applying parse-events and then ->str

    • (= "@foo" (-> "@foo" parse-events ->str))
  • Equivalence of alda-clj events and the result of applying parse-events to them.

    • (= [(->AtMarker "foo")] (parse-events "@foo"))
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