aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_helper.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-06-26 10:37:54 +0100
committerCharlie Blake2018-06-26 10:37:54 +0100
commit797400ea32ac1f6588e834fc1bcb42aa67fa6863 (patch)
tree16352c5245f2f94dadf31c3e510eedfc9254fc3d /src/test/test_helper.cpp
parentAdd test to make sure cache encodes face up (diff)
downloadmetasol-797400ea32ac1f6588e834fc1bcb42aa67fa6863.tar.gz
metasol-797400ea32ac1f6588e834fc1bcb42aa67fa6863.zip

Finished klondike correct impl

Diffstat (limited to 'src/test/test_helper.cpp')
-rw-r--r--src/test/test_helper.cpp9
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
<< ")";
}