aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorthecharlesblake2018-01-03 12:51:47 +0000
committerthecharlesblake2018-01-03 12:51:47 +0000
commit758d919cb5d600a421636ce54df9f28b6fc832ba (patch)
tree57f8311a9452a9d193bb0b5c71f4621479593196 /src/test
parentRename util to json_helper (diff)
downloadmetasol-758d919cb5d600a421636ce54df9f28b6fc832ba.tar.gz
metasol-758d919cb5d600a421636ce54df9f28b6fc832ba.zip

Refactor sol_rules into seperate parser class

Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_helper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp
index 59e7584..117273c 100644
--- a/src/test/test_helper.cpp
+++ b/src/test/test_helper.cpp
@@ -8,16 +8,17 @@
#include "../main/game/game_state.h"
#include "../main/solver/solver.h"
#include "../main/input-output/json_helper.h"
+#include "../main/input-output/rules_parser.h"
using namespace rapidjson;
using namespace std;
bool test_helper::is_solvable(const std::string& input_file, const std::string& preset_type) {
const Document in_doc = json_helper::get_file_json(input_file);
- const sol_rules rules = sol_rules::from_preset(preset_type);
+ const sol_rules rules = rules_parser::from_preset(preset_type);
game_state gs(rules, in_doc);
solver sol(gs, rules);
- return sol.run() ? true : false;
+ return sol.run();
}