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