mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 15:29:24 +00:00
42b1b7dc53
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
35 lines
731 B
C++
35 lines
731 B
C++
#include "stdafx.h"
|
|
#include "FuseExpectedTestResults.h"
|
|
|
|
void Fuse::ExpectedTestResults::read(std::ifstream& file) {
|
|
bool finished = false;
|
|
while (!file.eof()) {
|
|
ExpectedTestResult result;
|
|
result.read(file);
|
|
finished = result.finish;
|
|
if (!finished)
|
|
results[result.description] = result;
|
|
}
|
|
}
|
|
|
|
void Fuse::ExpectedTestResults::write(std::ofstream& file) {
|
|
for (auto result : results) {
|
|
result.second.write(file);
|
|
file << std::endl << std::endl;
|
|
}
|
|
}
|
|
|
|
void Fuse::ExpectedTestResults::read(std::string path) {
|
|
std::ifstream file;
|
|
file >> std::hex;
|
|
file.open(path);
|
|
read(file);
|
|
}
|
|
|
|
void Fuse::ExpectedTestResults::write(std::string path) {
|
|
std::ofstream file;
|
|
file << std::hex;
|
|
file.open(path);
|
|
write(file);
|
|
}
|