2017-08-10 19:34:17 +00:00
|
|
|
#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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-10 22:46:41 +00:00
|
|
|
void Fuse::Tests::write(std::ofstream& file) {
|
|
|
|
for (auto test : tests) {
|
|
|
|
test.second.write(file);
|
|
|
|
file << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:34:17 +00:00
|
|
|
void Fuse::Tests::read(std::string path) {
|
|
|
|
std::ifstream file;
|
|
|
|
file >> std::hex;
|
|
|
|
file.open(path);
|
|
|
|
read(file);
|
|
|
|
}
|
2017-08-10 22:46:41 +00:00
|
|
|
|
|
|
|
void Fuse::Tests::write(std::string path) {
|
|
|
|
std::ofstream file;
|
|
|
|
file.open(path);
|
|
|
|
write(file);
|
|
|
|
}
|