integrationTest.h (824B)
1 #pragma once 2 3 #include "virusConsoleLib/consoleApp.h" 4 5 #include "synthLib/wavReader.h" 6 7 namespace baseLib 8 { 9 class CommandLine; 10 } 11 12 class IntegrationTest 13 { 14 public: 15 explicit IntegrationTest(const baseLib::CommandLine& _commandLine, std::string _romFile, std::string _presetName, std::string _outputFolder, virusLib::DeviceModel _tiModel); 16 17 int run(); 18 19 private: 20 struct File 21 { 22 std::vector<uint8_t> file; 23 synthLib::Data data; 24 }; 25 26 bool loadAudioFile(File& _dst, const std::string& _filename) const; 27 int runCompare(); 28 int runCreate(int _lengthSeconds); 29 int createAudioFile(File& _dst, const std::string& _prefix, uint32_t _sampleCount); 30 31 const baseLib::CommandLine& m_cmd; 32 const std::string m_romFile; 33 const std::string m_presetName; 34 const std::string m_outputFolder; 35 ConsoleApp m_app; 36 37 File m_referenceFile; 38 };