diff options
| author | Charlie Blake | 2018-06-26 12:02:44 +0100 |
|---|---|---|
| committer | GitHub | 2018-06-26 12:02:44 +0100 |
| commit | b3f79030aef87d9bd0a543bac603f1c2cb697718 (patch) | |
| tree | 9a67e59d1752dcd0e6c68be71b995abaf63781ed /src/test/test_helper.cpp | |
| parent | Merge pull request #70 from thecharlesblake/ipg (diff) | |
| parent | Finished klondike correct impl (diff) | |
| download | metasol-b3f79030aef87d9bd0a543bac603f1c2cb697718.tar.gz metasol-b3f79030aef87d9bd0a543bac603f1c2cb697718.zip | |
Merge pull request #71 from thecharlesblake/correct-klondike
Correct klondike
Diffstat (limited to 'src/test/test_helper.cpp')
| -rw-r--r-- | src/test/test_helper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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<std::initializer_list<std::string>> 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<pile>{ + 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<pile> piles, + string_il piles, vector<move> exp_moves) { game_state gs(sr, piles); vector<move> 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 << ")"; } |
