FSE/test/TestConsistency.cpp
IlyaShurupov 1efe2c0a08 clean-up
2024-03-31 12:08:55 +03:00

29 lines
No EOL
578 B
C++

#include "Interpreter.hpp"
#include <fstream>
#include <iostream>
// generates and saves final state to check if there are any logic changes to the code
int main(int, char*[]) {
Interpreter interpreter;
interpreter.logType = Interpreter::NONE;
std::ifstream inputFile("commands");
if (!inputFile.is_open()) {
std::cerr << "Failed to open the file." << std::endl;
return 1;
}
std::string line;
while (std::getline(inputFile, line)) {
interpreter.interpret(line);
}
inputFile.close();
interpreter.dumpToFile("current_state");
return 0;
}