From 797400ea32ac1f6588e834fc1bcb42aa67fa6863 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Tue, 26 Jun 2018 10:37:54 +0100 Subject: Finished klondike correct impl --- src/test/test_helper.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/test/test_helper.cpp') diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp index e1aa0a7..1bc1f24 100644 --- a/src/test/test_helper.cpp +++ b/src/test/test_helper.cpp @@ -14,10 +14,12 @@ #define ASSERT_(t_f, statement) ASSERT_TRUE((statement) == (t_f)) using namespace rapidjson; -using std::initializer_list; using std::vector; using std::ostream; +typedef std::initializer_list> string_il; + + 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 = rules_parser::from_preset(preset_type); @@ -35,7 +37,7 @@ void test_helper::run_foundations_dominance_test(sol_rules::build_policy policy, rules.foundations_removable = false; rules.cells = 0; - game_state gs = game_state(rules, std::initializer_list{ + game_state gs = game_state(rules, string_il{ {}, {}, {}, @@ -63,7 +65,7 @@ void test_helper::run_foundations_dominance_test(sol_rules::build_policy policy, } void test_helper::expected_moves_test(sol_rules sr, - initializer_list piles, + string_il piles, vector exp_moves) { game_state gs(sr, piles); vector actual_moves = gs.get_legal_moves(); @@ -88,6 +90,7 @@ ostream& operator <<(ostream& os, const move& m) { return os << "move:(" << int(m.from) << "," << int(m.to) << "," << int(m.count) + << "," << m.reveal_move << ")"; } -- cgit v1.2.1