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

regarding tests #4

Open
smoothdeveloper opened this issue Jun 30, 2022 · 3 comments
Open

regarding tests #4

smoothdeveloper opened this issue Jun 30, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@smoothdeveloper
Copy link

I believe generic integration test sets could be written in such ways:

  • partition midi file
  • input midi file
  • expected output midi file

each set in a separate directory

running the library on 2 first inputs and perform a diff on the expected output midi file and the output given by the library.

a bijective "midi file <-> text file" format would help keeping it all in plain text to ease with displaying the diff.

just a suggestion :)

@josephlarralde josephlarralde added the enhancement New feature or request label Jul 1, 2022
@josephlarralde
Copy link
Contributor

nice idea :)
we've been wondering about integrating MIDI capabilities directly into the library, but for the moment it only consumes and produces some non MIDI standard structs.
@rblard already made an ossia score midifile performer plugin, including a midifile parser which works pretty well :)
We could indeed use a MIDI library as a submodule, write adapters for the MIDI messages, and run some tests on MIDI files from this repo ...
To be investigated

@smoothdeveloper
Copy link
Author

Maybe a textual representation of this non standard struct works the same for this purpose?

I think it makes adding tests and adjusting them better experience as it doesn't involve changing the test code.

It is a bit of upfront work, but generally makes the test codebase more resilient, especially to refactors on the actual code under test, etc.

@josephlarralde
Copy link
Contributor

I just added libremidi to Catch2 tests and it seems to work.
Getting closer to easy testing of midi files ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants