Tests: Fixed some issues with automated tests
This commit is contained in:
parent
d4f8140eef
commit
933ed439b7
2 changed files with 8 additions and 4 deletions
|
@ -170,10 +170,11 @@ void RecordedRomTest::RecordFromTest(string newTestFilename, string existingTest
|
|||
zipReader.LoadArchive(existingTestFilename);
|
||||
std::stringstream testMovie = zipReader.GetStream("TestMovie.mmo");
|
||||
std::stringstream testRom = zipReader.GetStream("TestRom.nes");
|
||||
VirtualFile romFile(testRom, newTestFilename);
|
||||
|
||||
if(testMovie && testRom) {
|
||||
Console::Pause();
|
||||
Console::LoadROM(testRom);
|
||||
Console::LoadROM(romFile);
|
||||
testRom.seekg(0, ios::beg);
|
||||
_romStream << testRom.rdbuf();
|
||||
|
||||
|
@ -248,8 +249,10 @@ int32_t RecordedRomTest::Run(string filename)
|
|||
}
|
||||
}
|
||||
|
||||
VirtualFile testRomFile(testRom, filename);
|
||||
|
||||
//Start playing movie
|
||||
if(Console::LoadROM(testRom)) {
|
||||
if(Console::LoadROM(testRomFile)) {
|
||||
_runningTest = true;
|
||||
MovieManager::Play(testMovie, false);
|
||||
|
||||
|
|
|
@ -65,8 +65,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
VirtualFile(std::istream &input)
|
||||
VirtualFile(std::istream &input, string filePath)
|
||||
{
|
||||
_path = filePath;
|
||||
FromStream(input, _data);
|
||||
}
|
||||
|
||||
|
@ -99,7 +100,7 @@ public:
|
|||
|
||||
string GetFileName()
|
||||
{
|
||||
return _innerFile.empty() ? FolderUtilities::GetFilename(_path, false) : _innerFile;
|
||||
return _innerFile.empty() ? FolderUtilities::GetFilename(_path, true) : _innerFile;
|
||||
}
|
||||
|
||||
string GetSha1Hash()
|
||||
|
|
Loading…
Add table
Reference in a new issue