aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_helper.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-01-09 08:58:30 +0000
committerGitHub2018-01-09 08:58:30 +0000
commit93bfbeec309b027331f75d10864c99f19a958cfd (patch)
tree5ad08a4621dbc118480553d53666e3e507ce584e /src/test/test_helper.cpp
parentMerge pull request #27 from thecharlesblake/efficient-implementation (diff)
parentAdd spider to benchmark script (diff)
downloadmetasol-93bfbeec309b027331f75d10864c99f19a958cfd.tar.gz
metasol-93bfbeec309b027331f75d10864c99f19a958cfd.zip

Merge pull request #28 from thecharlesblake/all-canonical-games

All canonical games

Diffstat (limited to 'src/test/test_helper.cpp')
-rw-r--r--src/test/test_helper.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp
index 9c258a3..14218f7 100644
--- a/src/test/test_helper.cpp
+++ b/src/test/test_helper.cpp
@@ -7,17 +7,18 @@
#include "test_helper.h"
#include "../main/game/game_state.h"
#include "../main/solver/solver.h"
-#include "../main/util/util.h"
+#include "../main/input-output/input/json-parsing/json_helper.h"
+#include "../main/input-output/input/json-parsing/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 = util::get_file_json(input_file);
- const sol_rules rules = sol_rules::from_preset(preset_type);
+ const Document in_doc = json_helper::get_file_json(input_file);
+ 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();
}