31 lines
624 B
C++
31 lines
624 B
C++
#include "MidiReader.h"
|
|
|
|
#include "TestCase.h"
|
|
#include "TestCaseRunner.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
class TestReadMidi : public TestCase
|
|
{
|
|
public:
|
|
bool Run() override
|
|
{
|
|
MidiReader reader;
|
|
reader.Read("/home/jmsgrogan/Downloads/test.mid");
|
|
|
|
auto document = reader.GetDocument();
|
|
std::cout << document->Serialize() << std::endl;
|
|
return true;
|
|
}
|
|
};
|
|
|
|
int main()
|
|
{
|
|
TestCaseRunner runner;
|
|
runner.AddTestCase("TestReadMidi", std::make_unique<TestReadMidi>());
|
|
|
|
const auto testsPassed = runner.Run();
|
|
return testsPassed ? 0 : -1;
|
|
}
|